CMAKE_SYSTEM_NAME.rst 688 B

1234567891011121314151617181920
  1. CMAKE_SYSTEM_NAME
  2. -----------------
  3. The name of the operating system for which CMake is to build.
  4. See the :variable:`CMAKE_SYSTEM_VERSION` variable for the OS version.
  5. System Name for Host Builds
  6. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  7. ``CMAKE_SYSTEM_NAME`` is by default set to the same value as the
  8. :variable:`CMAKE_HOST_SYSTEM_NAME` variable so that the build
  9. targets the host system.
  10. System Name for Cross Compiling
  11. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  12. ``CMAKE_SYSTEM_NAME`` may be set explicitly when first configuring a new build
  13. tree in order to enable :ref:`cross compiling <Cross Compiling Toolchain>`.
  14. In this case the :variable:`CMAKE_SYSTEM_VERSION` variable must also be
  15. set explicitly.