diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-08 19:18:58 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-08 19:18:58 +0300 |
commit | 9175723e0328570f12975333d4f9cc0d863a6643 (patch) | |
tree | a94ad46972d6fd294edffab0558e4b1ff149f24c /cmake/common.cmake | |
parent | boost/build: add --runtime-link (diff) | |
download | cmake-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.cmake | 5 |
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}") |