1CMAKE_SYSTEM_NAME 2----------------- 3 4The name of the operating system for which CMake is to build. 5See the :variable:`CMAKE_SYSTEM_VERSION` variable for the OS version. 6 7Note that ``CMAKE_SYSTEM_NAME`` is not set to anything by default when running 8in script mode, since it's not building anything. 9 10System Name for Host Builds 11^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 13``CMAKE_SYSTEM_NAME`` is by default set to the same value as the 14:variable:`CMAKE_HOST_SYSTEM_NAME` variable so that the build 15targets the host system. 16 17System Name for Cross Compiling 18^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 19 20``CMAKE_SYSTEM_NAME`` may be set explicitly when first configuring a new build 21tree in order to enable :ref:`cross compiling <Cross Compiling Toolchain>`. 22In this case the :variable:`CMAKE_SYSTEM_VERSION` variable must also be 23set explicitly. 24