CMAKE_GENERATOR_PLATFORM.rst 1.1 KB

12345678910111213141516171819202122232425262728
  1. CMAKE_GENERATOR_PLATFORM
  2. ------------------------
  3. Generator-specific target platform specification provided by user.
  4. Some CMake generators support a target platform name to be given
  5. to the native build system to choose a compiler toolchain.
  6. If the user specifies a platform name (e.g. via the :manual:`cmake(1)` ``-A``
  7. option) the value will be available in this variable.
  8. The value of this variable should never be modified by project code.
  9. A toolchain file specified by the :variable:`CMAKE_TOOLCHAIN_FILE`
  10. variable may initialize ``CMAKE_GENERATOR_PLATFORM``. Once a given
  11. build tree has been initialized with a particular value for this
  12. variable, changing the value has undefined behavior.
  13. Platform specification is supported only on specific generators:
  14. * For :ref:`Visual Studio Generators` with VS 2005 and above this
  15. specifies the target architecture.
  16. See native build system documentation for allowed platform names.
  17. Visual Studio Platform Selection
  18. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  19. On :ref:`Visual Studio Generators` the selected platform name
  20. is provided in the :variable:`CMAKE_VS_PLATFORM_NAME` variable.