CMake/Help/variable/CMAKE_MAKE_PROGRAM.rst
Fred Baksik a37a4a00c8 GHS: Add toolset selection support
-- Use the specified toolset located within GHS_TOOLSET_ROOT
-- Update how the latest toolset is determined; scan the location GHS_TOOLSET_ROOT and sort it
   No longer use registry settings looking for installations
     The registry values are assigned in installation order for Green Hills tools not version order
-- Update to use gbuild.exe from the proper toolset
-- Clarify that CMAKE_MAKE_PROGRAM should not be set by user.
-- Detect some toolset changes when regenerating project files
   This could occur if GHS_TOOLSET_ROOT was changed by user after the initial project generation
   This could occur if CMAKE_MAKE_PROGRAM was changed at the command line
-- Use placeholder values for CMAKE_<LANG>_COMPILER
   The MULTI build system only uses gbuild to build a project
     gbuild uses the project file to determine which set of compilers to use based on target platform and architecture
     because compiler detection is skipped, placeholder values are used so that CMake does not complain
2018-07-11 08:28:36 -04:00

68 lines
2.8 KiB
ReStructuredText

CMAKE_MAKE_PROGRAM
------------------
Tool that can launch the native build system.
The value may be the full path to an executable or just the tool
name if it is expected to be in the ``PATH``.
The tool selected depends on the :variable:`CMAKE_GENERATOR` used
to configure the project:
* The :ref:`Makefile Generators` set this to ``make``, ``gmake``, or
a generator-specific tool (e.g. ``nmake`` for :generator:`NMake Makefiles`).
These generators store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
so that it may be edited by the user.
* The :generator:`Ninja` generator sets this to ``ninja``.
This generator stores ``CMAKE_MAKE_PROGRAM`` in the CMake cache
so that it may be edited by the user.
* The :generator:`Xcode` generator sets this to ``xcodebuild`` (or possibly an
otherwise undocumented ``cmakexbuild`` wrapper implementing some
workarounds).
This generator prefers to lookup the build tool at build time
rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
ahead of time. This is because ``xcodebuild`` is easy to find,
the ``cmakexbuild`` wrapper is needed only for older Xcode versions,
and the path to ``cmakexbuild`` may be outdated if CMake itself moves.
For compatibility with versions of CMake prior to 3.2, if
a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
the CMake cache then CMake will use the specified value.
* The :ref:`Visual Studio Generators` set this to the full path to
``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9), or
``VCExpress.exe`` (VS Express 8,9).
(See also variables
:variable:`CMAKE_VS_MSBUILD_COMMAND` and
:variable:`CMAKE_VS_DEVENV_COMMAND`.
These generators prefer to lookup the build tool at build time
rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
ahead of time. This is because the tools are version-specific
and can be located using the Windows Registry. It is also
necessary because the proper build tool may depend on the
project content (e.g. the Intel Fortran plugin to VS 10 and 11
requires ``devenv.com`` to build its ``.vfproj`` project files
even though ``MSBuild.exe`` is normally preferred to support
the :variable:`CMAKE_GENERATOR_TOOLSET`).
For compatibility with versions of CMake prior to 3.0, if
a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
the CMake cache then CMake will use the specified value if
possible.
* The :generator:`Green Hills MULTI` generator sets this to the full
path to ``gbuild.exe`` based upon the toolset being used.
Once the generator has initialized a particular value for this
variable, changing the value has undefined behavior.
The ``CMAKE_MAKE_PROGRAM`` variable is set for use by project code.
The value is also used by the :manual:`cmake(1)` ``--build`` and
:manual:`ctest(1)` ``--build-and-test`` tools to launch the native
build process.