From c6ce485bcedf873541dd2260af074c1ec3afcd4a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 13 Dec 2019 06:06:27 +0300 Subject: common.cmake: CC_STATIC_RUNTIME=OFF on Linux --- common.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'common.cmake') diff --git a/common.cmake b/common.cmake index 97de93f..f076d2d 100644 --- a/common.cmake +++ b/common.cmake @@ -32,7 +32,6 @@ elseif(CMAKE_CXX_COMPILER_ID) else() set(toolset "unknown") endif() -message(STATUS "Toolset: ${toolset}") if(toolset STREQUAL "GNU") set(is_gcc ON) @@ -60,7 +59,11 @@ if(NOT DEFINED CC_WINDOWS_DEF) option(CC_WINDOWS_DEF "Define useful Windows macros" "${default_value}") endif() if(NOT DEFINED CC_STATIC_RUNTIME) - option(CC_STATIC_RUNTIME "Link the runtime statically" "${default_value}") + set(cc_static_runtime_default "${default_value}") + if(UNIX) + set(cc_static_runtime_default OFF) + endif() + option(CC_STATIC_RUNTIME "Link the runtime statically" "${cc_static_runtime_default}") endif() if(NOT DEFINED CC_STRIP_SYMBOLS) option(CC_STRIP_SYMBOLS "Strip debug symbols" "${default_value}") @@ -69,6 +72,7 @@ endif() option(Boost_USE_STATIC_LIBS "Use the static Boost libraries" "${default_value}") option(Boost_USE_STATIC_RUNTIME "Use Boost libraries linked to the runtime statically" "${CC_STATIC_RUNTIME}") +message(STATUS "Toolset: ${toolset}") message(STATUS "C++ standard: ${CC_CXX_STANDARD}") message(STATUS "Set common compiler options: ${CC_BEST_PRACTICES}") message(STATUS "Define useful Windows macros: ${CC_WINDOWS_DEF}") -- cgit v1.2.3