From 9175723e0328570f12975333d4f9cc0d863a6643 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 8 Jan 2020 19:18:58 +0300 Subject: common.cmake: CC_STATIC_RUNTIME=OFF implied if using dynamic Boost libs --- cmake/common.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmake') 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}") -- cgit v1.2.3