summaryrefslogtreecommitdiff
path: root/Help/variable/CMAKE_SYSTEM_VERSION.rst
blob: f388ccf6b2ee3d9224d7bd688beb3a3b696df0dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CMAKE_SYSTEM_VERSION
--------------------

The version of the operating system for which CMake is to build.
See the :variable:`CMAKE_SYSTEM_NAME` variable for the OS name.

System Version for Host Builds
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When the :variable:`CMAKE_SYSTEM_NAME` variable takes its default value
then ``CMAKE_SYSTEM_VERSION`` is by default set to the same value as the
:variable:`CMAKE_HOST_SYSTEM_VERSION` variable so that the build targets
the host system version.

System Version for Cross Compiling
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When the :variable:`CMAKE_SYSTEM_NAME` variable is set explicitly to
enable :ref:`cross compiling <Cross Compiling Toolchain>` then the
value of ``CMAKE_SYSTEM_VERSION`` must also be set explicitly to specify
the target system version.