We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a68515 commit 47856c6Copy full SHA for 47856c6
CMakeLists.txt
@@ -36,6 +36,20 @@ option(FPIC "build with -fPIC" OFF)
36
# build all projects (libco, gen, test, unitest)
37
option(BUILD_ALL "Build all projects" OFF)
38
39
+# vs runtime, use MT
40
+if(MSVC)
41
+ option(STATIC_VS_CRT "use /MT or /MTd" ON)
42
+
43
+ if(STATIC_VS_CRT)
44
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
45
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
46
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
47
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
48
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
49
+ endif()
50
+endif()
51
52
53
include_directories(include)
54
add_subdirectory(src)
55
0 commit comments