aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cmake
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-08 19:18:58 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-08 19:18:58 +0300
commit9175723e0328570f12975333d4f9cc0d863a6643 (patch)
treea94ad46972d6fd294edffab0558e4b1ff149f24c /cmake
parentboost/build: add --runtime-link (diff)
downloadcmake-common-9175723e0328570f12975333d4f9cc0d863a6643.tar.gz
cmake-common-9175723e0328570f12975333d4f9cc0d863a6643.zip
common.cmake: CC_STATIC_RUNTIME=OFF implied if using dynamic Boost libs
Diffstat (limited to '')
-rw-r--r--cmake/common.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 447f340..1e23121 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -60,7 +60,12 @@ if(NOT DEFINED CC_WINDOWS_DEF)
endif()
if(NOT DEFINED CC_STATIC_RUNTIME)
set(static_runtime_default_value "${default_value}")
+ 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:
set(static_runtime_default_value OFF)
endif()
option(CC_STATIC_RUNTIME "Link the runtime statically" "${static_runtime_default_value}")