Add -MT switch for CMake Windows build
This commit is contained in:
@@ -78,7 +78,7 @@ ENDIF (APPLE)
|
|||||||
|
|
||||||
IF (MSVC)
|
IF (MSVC)
|
||||||
set(CMAKE_C_FLAGS_RELEASE "/GL")
|
set(CMAKE_C_FLAGS_RELEASE "/GL")
|
||||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -MT)
|
||||||
ENDIF (MSVC)
|
ENDIF (MSVC)
|
||||||
|
|
||||||
# configure file groups
|
# configure file groups
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
|
|
||||||
|
# Link to multi-threaded static runtime library
|
||||||
|
IF (MSVC)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -MT)
|
||||||
|
ENDIF (MSVC)
|
||||||
|
|
||||||
|
|
||||||
# Set up file groups for exe target
|
# Set up file groups for exe target
|
||||||
set(EPANET_CLI_SOURCES main.c)
|
set(EPANET_CLI_SOURCES main.c)
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
|
|
||||||
|
# Disable deprecation & link to multi-threaded static runtime library
|
||||||
|
IF (MSVC)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -MT)
|
||||||
|
ENDIF (MSVC)
|
||||||
|
|
||||||
|
|
||||||
# configure file groups
|
# configure file groups
|
||||||
set(EPANET_OUT_SOURCES src/epanet_output.c
|
set(EPANET_OUT_SOURCES src/epanet_output.c
|
||||||
../util/errormanager.c
|
../util/errormanager.c
|
||||||
|
|||||||
Reference in New Issue
Block a user