summaryrefslogtreecommitdiff
path: root/share/cmake-3.18/Help/variable/CMAKE_SYSTEM_NAME.rst
diff options
context:
space:
mode:
Diffstat (limited to 'share/cmake-3.18/Help/variable/CMAKE_SYSTEM_NAME.rst')
-rw-r--r--share/cmake-3.18/Help/variable/CMAKE_SYSTEM_NAME.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/share/cmake-3.18/Help/variable/CMAKE_SYSTEM_NAME.rst b/share/cmake-3.18/Help/variable/CMAKE_SYSTEM_NAME.rst
new file mode 100644
index 0000000..fef53ee
--- /dev/null
+++ b/share/cmake-3.18/Help/variable/CMAKE_SYSTEM_NAME.rst
@@ -0,0 +1,23 @@
+CMAKE_SYSTEM_NAME
+-----------------
+
+The name of the operating system for which CMake is to build.
+See the :variable:`CMAKE_SYSTEM_VERSION` variable for the OS version.
+
+Note that ``CMAKE_SYSTEM_NAME`` is not set to anything by default when running
+in script mode, since it's not building anything.
+
+System Name for Host Builds
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+``CMAKE_SYSTEM_NAME`` is by default set to the same value as the
+:variable:`CMAKE_HOST_SYSTEM_NAME` variable so that the build
+targets the host system.
+
+System Name for Cross Compiling
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+``CMAKE_SYSTEM_NAME`` may be set explicitly when first configuring a new build
+tree in order to enable :ref:`cross compiling <Cross Compiling Toolchain>`.
+In this case the :variable:`CMAKE_SYSTEM_VERSION` variable must also be
+set explicitly.