From 8cc4ac35cf13cf3c9b9434b3134ebc481edde37a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 21 Jan 2026 00:12:25 +0100 Subject: common.cmake: fix CC_STATIC_RUNTIME w/r/t Boost Since I've been transitioning to Boost's CMake files, the shortcut where I just specify LIBRARYDIR & USE_STATIC_RUNTIME doesn't seem to work anymore, so we're fighting. --- common.cmake | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.3