aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/common.cmake
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-13 06:06:27 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-13 06:06:27 +0300
commitc6ce485bcedf873541dd2260af074c1ec3afcd4a (patch)
tree89721b82cb39269db484301abee6e1fdf40ae36e /common.cmake
parentbuild/boost: add generic build.py script (diff)
downloadcmake-common-c6ce485bcedf873541dd2260af074c1ec3afcd4a.tar.gz
cmake-common-c6ce485bcedf873541dd2260af074c1ec3afcd4a.zip
common.cmake: CC_STATIC_RUNTIME=OFF on Linux
Diffstat (limited to '')
-rw-r--r--common.cmake8
1 files changed, 6 insertions, 2 deletions
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}")