summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2022-08-22 21:37:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-08-22 21:37:49 (GMT)
commita8b274c74e3f5c28efa7eaa5369cad6ca12ca548 (patch)
tree8efff627a6c11f5888fab1546a3b122f62f09751 /Modules/Platform
parent7037cfc0f48739bd1eb3498827ebf501671302c7 (diff)
parenta20d7a9707009a5195a817ac54ecabbfd8bd48db (diff)
downloadCMake-a8b274c74e3f5c28efa7eaa5369cad6ca12ca548.zip
CMake-a8b274c74e3f5c28efa7eaa5369cad6ca12ca548.tar.gz
CMake-a8b274c74e3f5c28efa7eaa5369cad6ca12ca548.tar.bz2
Merge topic 'bsd-variables'
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system 2ae42d0aa3 kFreeBSD: Do not unset LINUX variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7573
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/DragonFly.cmake2
-rw-r--r--Modules/Platform/FreeBSD.cmake2
-rw-r--r--Modules/Platform/NetBSD.cmake2
-rw-r--r--Modules/Platform/OpenBSD.cmake2
-rw-r--r--Modules/Platform/kFreeBSD.cmake4
5 files changed, 10 insertions, 2 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
diff --git a/Modules/Platform/kFreeBSD.cmake b/Modules/Platform/kFreeBSD.cmake
index 01ddfd3..09c240d 100644
--- a/Modules/Platform/kFreeBSD.cmake
+++ b/Modules/Platform/kFreeBSD.cmake
@@ -1,5 +1,5 @@
-# kFreeBSD looks just like Linux.
+# kFreeBSD is a Debian GNU distribution with a kernel from FreeBSD,
+# and should be marked as LINUX
include(Platform/Linux)
-unset(LINUX)
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-kfreebsd-gnu[a-z0-9_]*")