aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-09 02:22:32 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-09 02:22:32 +0300
commitddea42efaab3889258ac0987abbac6132142b986 (patch)
treeebfa08d11e6f9f696e278cc24a74d94bc6e31036
parentfix PyLint-discovered bugs (diff)
downloadcmake-common-ddea42efaab3889258ac0987abbac6132142b986.tar.gz
cmake-common-ddea42efaab3889258ac0987abbac6132142b986.zip
common.cmake: more precise platform detection
Diffstat (limited to '')
-rw-r--r--cmake/common.cmake6
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}")