diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-09 02:22:32 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-09 02:22:32 +0300 |
commit | ddea42efaab3889258ac0987abbac6132142b986 (patch) | |
tree | ebfa08d11e6f9f696e278cc24a74d94bc6e31036 /cmake | |
parent | fix PyLint-discovered bugs (diff) | |
download | cmake-common-ddea42efaab3889258ac0987abbac6132142b986.tar.gz cmake-common-ddea42efaab3889258ac0987abbac6132142b986.zip |
common.cmake: more precise platform detection
Diffstat (limited to '')
-rw-r--r-- | cmake/common.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake index 1e23121..2179a32 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -63,9 +63,9 @@ if(NOT DEFINED CC_STATIC_RUNTIME) if(DEFINED Boost_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS) # Linking to dynamic Boost libs and the static runtime is a no-no: set(static_runtime_default_value OFF) - endif() - if(UNIX) - # Linking to the GNU C library statically is dangerous: + elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR MINGW) + else() + # At this point, Linux-like environment & the GNU C Library are assumed. set(static_runtime_default_value OFF) endif() option(CC_STATIC_RUNTIME "Link the runtime statically" "${static_runtime_default_value}") |