diff options
| -rw-r--r-- | common.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common.cmake b/common.cmake index 36f232b..39e490d 100644 --- a/common.cmake +++ b/common.cmake @@ -68,6 +68,10 @@ if(NOT DEFINED CC_STATIC_RUNTIME) # Linking to dynamic Boost libs and the static runtime is a no-no: set(static_runtime_default_value OFF) endif() + if((CMAKE_HOST_LINUX OR CMAKE_HOST_APPLE) AND static_runtime_default_value) + message(STATUS "Cannot link to the GNU C Library or BSD libc (which are assumed) statically, going to link dynamically") + set(static_runtime_default_value OFF) + endif() option(CC_STATIC_RUNTIME "Link the runtime statically" "${static_runtime_default_value}") endif() if(NOT DEFINED CC_STRIP_SYMBOLS) |
