diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2022-08-15 17:53:35 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2022-08-20 23:27:59 (GMT) |
commit | a20d7a9707009a5195a817ac54ecabbfd8bd48db (patch) | |
tree | 33d2002c812ddd3ca694c93a6557a3147462ff81 /Modules | |
parent | 2ae42d0aa38ead2935d545f7d398ddf5df8b396d (diff) | |
download | CMake-a20d7a9707009a5195a817ac54ecabbfd8bd48db.zip CMake-a20d7a9707009a5195a817ac54ecabbfd8bd48db.tar.gz CMake-a20d7a9707009a5195a817ac54ecabbfd8bd48db.tar.bz2 |
BSD: Set *BSD variables when targeting a *BSD system
Fixes: #23853
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/DragonFly.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/FreeBSD.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/NetBSD.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/OpenBSD.cmake | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Platform/DragonFly.cmake b/Modules/Platform/DragonFly.cmake index 12e5f3c..d8bc05a 100644 --- a/Modules/Platform/DragonFly.cmake +++ b/Modules/Platform/DragonFly.cmake @@ -3,6 +3,8 @@ # see http://archive.netbsd.se/?ml=dfbsd-users&a=2007-07&m=4678361 include(Platform/FreeBSD) +unset(FREEBSD) +set(DRAGONFLYBSD 1) # DragonFly BSD requires -z origin to enable $ORIGIN expansion in RPATH. # This is not required for FreeBSD since 10.2-RELEASE. diff --git a/Modules/Platform/FreeBSD.cmake b/Modules/Platform/FreeBSD.cmake index bd5a786..e968a78 100644 --- a/Modules/Platform/FreeBSD.cmake +++ b/Modules/Platform/FreeBSD.cmake @@ -1,3 +1,5 @@ +set(FREEBSD 1) +set(BSD 1) set(CMAKE_DL_LIBS "") set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC") set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE") diff --git a/Modules/Platform/NetBSD.cmake b/Modules/Platform/NetBSD.cmake index ab85923..a64bf0b 100644 --- a/Modules/Platform/NetBSD.cmake +++ b/Modules/Platform/NetBSD.cmake @@ -1,3 +1,5 @@ +set(NETBSD 1) +set(BSD 1) set(CMAKE_DL_LIBS "") set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC") set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE") diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake index 97e2a6a..f6b955a 100644 --- a/Modules/Platform/OpenBSD.cmake +++ b/Modules/Platform/OpenBSD.cmake @@ -1,4 +1,6 @@ include(Platform/NetBSD) +unset(NETBSD) +set(OPENBSD 1) # On OpenBSD, the compile time linker does not share it's configuration with # the runtime linker. This will extract the library search paths from the |