From 4c4efd1aaa0189e9d664b1efafd4397c322e6a8e Mon Sep 17 00:00:00 2001 From: Rick V Date: Fri, 19 Apr 2019 13:36:32 -0500 Subject: [PATCH] irrelevant on Microsoft C++ --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 57aa6e4f7..6e190c707 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,9 @@ project(${PROJECT_NAME} C CXX) option(USE_AVX2 "enable avx2 code" ) option(USE_NETNS "enable networking namespace support. Linux only" ) option(AMD_RYZEN_HACK "hack for AMD Ryzen FPU bug (support FMA3 and FMA4 in FPU, but does not show in CPUID)" ) +if (NOT MSVC) option(STATIC_LINK_RUNTIME "link statically against compiler runtime, standard library and pthreads") +endif() option(NON_PC_TARGET "non-pc target build: iphone, andriod, embedded non-i386 SBC, etc" ) option(SHADOW "use shadow testing framework. linux only" ) option(ASAN "use address sanitiser, if your system has it" ) @@ -76,8 +78,10 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND SHADOW) endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND SHADOW) if (WIN32 AND NOT STATIC_LINK_RUNTIME) - message("must ship compiler runtime libraries with this build: libwinpthread-1.dll, libgcc_s_dw2-1.dll, and libstdc++-6.dll") - message("for release builds, turn on STATIC_LINK_RUNTIME in cmake options") + if(NOT MSVC) + message("must ship compiler runtime libraries with this build: libwinpthread-1.dll, libgcc_s_dw2-1.dll, and libstdc++-6.dll") + message("for release builds, turn on STATIC_LINK_RUNTIME in cmake options") + endif() endif(WIN32 AND NOT STATIC_LINK_RUNTIME) add_subdirectory(vendor/cxxopts)