diff options
| author | Egor Tensin <egor@tensin.name> | 2026-01-21 00:12:25 +0100 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-01-21 00:12:25 +0100 |
| commit | 8cc4ac35cf13cf3c9b9434b3134ebc481edde37a (patch) | |
| tree | 204894a0df2e9a0e8c5520dd2b7b068a732b2d8f | |
| parent | project.boost: switch from `stage` to `install` (diff) | |
| download | cmake-common-8cc4ac35cf13cf3c9b9434b3134ebc481edde37a.tar.gz cmake-common-8cc4ac35cf13cf3c9b9434b3134ebc481edde37a.zip | |
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.
Diffstat (limited to '')
| -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) |
