62cd3904bf variable: Set LINUX variable on Linux target systems Acked-by: Kitware Robot <[email protected]> Merge-request: !7556
@@ -322,6 +322,7 @@ Variables that Describe the System
/variable/CYGWIN
/variable/GHSMULTI
/variable/IOS
+ /variable/LINUX
/variable/MINGW
/variable/MSVC
/variable/MSVC10
@@ -0,0 +1,4 @@
+Variables
+---------
+
+* The :variable:`LINUX` variable is set to true when the target system is Linux.
@@ -0,0 +1,6 @@
+LINUX
+-----
+.. versionadded:: 3.25
+Set to true when the target system is Linux.
@@ -1,3 +1,4 @@
+set(LINUX 1)
set(CMAKE_DL_LIBS "dl")
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
@@ -1,4 +1,5 @@
# kFreeBSD looks just like Linux.
include(Platform/Linux)
+unset(LINUX)
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-kfreebsd-gnu[a-z0-9_]*")