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