summaryrefslogtreecommitdiff
path: root/Modules/Platform
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2022-09-06 00:29:04 +0200
committerCristian Adam <cristian.adam@gmail.com>2022-09-06 01:02:34 +0200
commit288f72efea0636c498755a9cec6d5ddcbfed5c8c (patch)
tree990b00b513085b8f843f697bbcec8333c32f1309 /Modules/Platform
parent9b1b9b9aae371acb9d18b481d45bcaec2d312e27 (diff)
downloadcmake-288f72efea0636c498755a9cec6d5ddcbfed5c8c.tar.gz
BSD: Only use BSD as variable for target BSD system
Instead of having multiple boolean variables, we only have one string variable: BSD with the name of the target BSD system. Relates: #23853
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/DragonFly.cmake3
-rw-r--r--Modules/Platform/FreeBSD.cmake3
-rw-r--r--Modules/Platform/NetBSD.cmake3
-rw-r--r--Modules/Platform/OpenBSD.cmake3
4 files changed, 4 insertions, 8 deletions
diff --git a/Modules/Platform/DragonFly.cmake b/Modules/Platform/DragonFly.cmake
index d8bc05a1d6..994ba7931f 100644
--- a/Modules/Platform/DragonFly.cmake
+++ b/Modules/Platform/DragonFly.cmake
@@ -3,8 +3,7 @@
# see http://archive.netbsd.se/?ml=dfbsd-users&a=2007-07&m=4678361
include(Platform/FreeBSD)
-unset(FREEBSD)
-set(DRAGONFLYBSD 1)
+set(BSD "DragonFlyBSD")
# 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 e968a78ec3..9cd93998fe 100644
--- a/Modules/Platform/FreeBSD.cmake
+++ b/Modules/Platform/FreeBSD.cmake
@@ -1,5 +1,4 @@
-set(FREEBSD 1)
-set(BSD 1)
+set(BSD "FreeBSD")
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 a64bf0bd23..52c65942f2 100644
--- a/Modules/Platform/NetBSD.cmake
+++ b/Modules/Platform/NetBSD.cmake
@@ -1,5 +1,4 @@
-set(NETBSD 1)
-set(BSD 1)
+set(BSD "NetBSD")
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 f6b955a167..51ea60dff2 100644
--- a/Modules/Platform/OpenBSD.cmake
+++ b/Modules/Platform/OpenBSD.cmake
@@ -1,6 +1,5 @@
include(Platform/NetBSD)
-unset(NETBSD)
-set(OPENBSD 1)
+set(BSD "OpenBSD")
# 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