2013-10-15 19:17:36 +04:00
|
|
|
CMAKE_SYSTEM_VERSION
|
|
|
|
--------------------
|
|
|
|
|
2015-10-02 16:36:52 +03:00
|
|
|
The version of the operating system for which CMake is to build.
|
|
|
|
See the :variable:`CMAKE_SYSTEM_NAME` variable for the OS name.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-10-02 16:36:52 +03:00
|
|
|
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.
|
|
|
|
|
2015-09-24 00:27:07 +03:00
|
|
|
In the case of a host build then ``CMAKE_SYSTEM_VERSION`` may be set
|
|
|
|
explicitly when first configuring a new build tree in order to enable
|
|
|
|
targeting the build for a different version of the host operating system
|
|
|
|
than is actually running on the host. This is allowed and not considered
|
|
|
|
cross compiling so long as the binaries built for the specified OS version
|
|
|
|
can still run on the host.
|
|
|
|
|
2015-10-02 16:36:52 +03:00
|
|
|
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.
|