8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:43:03 +01:00

[build][cmake] Add compiler switch '/MT(d)' for MSVC. Use '-DMSVC_STATIC_RUNTIME=1' parameter during cmake call to turn on static runtime linking.

This commit is contained in:
egorpugin 2015-03-04 19:29:24 +00:00
parent 95b8ca0db0
commit b077124fed

View File

@ -183,6 +183,13 @@ if (WIN32)
set(disable_msvc_warnings "/wd4996")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP ${disable_msvc_warnings}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP ${disable_msvc_warnings}")
if (MSVC_STATIC_RUNTIME)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
endif()
endif(MSVC)
set(LIB_Ws2_32 Ws2_32)