1CMAKE_MAKE_PROGRAM
2------------------
3
4Tool that can launch the native build system.
5The value may be the full path to an executable or just the tool
6name if it is expected to be in the ``PATH``.
7
8The tool selected depends on the :variable:`CMAKE_GENERATOR` used
9to configure the project:
10
11* The :ref:`Makefile Generators` set this to ``make``, ``gmake``, or
12  a generator-specific tool (e.g. ``nmake`` for :generator:`NMake Makefiles`).
13
14  These generators store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
15  so that it may be edited by the user.
16
17* The :generator:`Ninja` generator sets this to ``ninja``.
18
19  This generator stores ``CMAKE_MAKE_PROGRAM`` in the CMake cache
20  so that it may be edited by the user.
21
22* The :generator:`Xcode` generator sets this to ``xcodebuild``.
23
24  This generator prefers to lookup the build tool at build time
25  rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
26  ahead of time.  This is because ``xcodebuild`` is easy to find.
27
28  For compatibility with versions of CMake prior to 3.2, if
29  a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
30  the CMake cache then CMake will use the specified value.
31
32* The :ref:`Visual Studio Generators` set this to the full path to
33  ``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9), or
34  ``VCExpress.exe`` (VS Express 8,9).
35  (See also variables
36  :variable:`CMAKE_VS_MSBUILD_COMMAND` and
37  :variable:`CMAKE_VS_DEVENV_COMMAND`.
38
39  These generators prefer to lookup the build tool at build time
40  rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
41  ahead of time.  This is because the tools are version-specific
42  and can be located using the Windows Registry.  It is also
43  necessary because the proper build tool may depend on the
44  project content (e.g. the Intel Fortran plugin to VS 10 and 11
45  requires ``devenv.com`` to build its ``.vfproj`` project files
46  even though ``MSBuild.exe`` is normally preferred to support
47  the :variable:`CMAKE_GENERATOR_TOOLSET`).
48
49  For compatibility with versions of CMake prior to 3.0, if
50  a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
51  the CMake cache then CMake will use the specified value if
52  possible.
53
54* The :generator:`Green Hills MULTI` generator sets this to the full
55  path to ``gbuild.exe(Windows)`` or ``gbuild(Linux)`` based upon
56  the toolset being used.
57
58  Once the generator has initialized a particular value for this
59  variable, changing the value has undefined behavior.
60
61The ``CMAKE_MAKE_PROGRAM`` variable is set for use by project code.
62The value is also used by the :manual:`cmake(1)` ``--build`` and
63:manual:`ctest(1)` ``--build-and-test`` tools to launch the native
64build process.
65