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 CMAKE_GENERATOR
used to configure the project:
-
The Makefile Generators set this to
make
,gmake
, or a generator-specific tool (e.g.nmake
forNMake Makefiles
).These generators store
CMAKE_MAKE_PROGRAM
in the CMake cache so that it may be edited by the user. -
The
Ninja
generator sets this toninja
.This generator stores
CMAKE_MAKE_PROGRAM
in the CMake cache so that it may be edited by the user. -
The
Xcode
generator sets this toxcodebuild
(or possibly an otherwise undocumentedcmakexbuild
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 becausexcodebuild
is easy to find, thecmakexbuild
wrapper is needed only for older Xcode versions, and the path tocmakexbuild
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 Visual Studio Generators set this to the full path to
MSBuild.exe
(VS >= 10),devenv.com
(VS 7,8,9),VCExpress.exe
(VS Express 8,9), ormsdev.exe
(VS 6). (See also variablesCMAKE_VS_MSBUILD_COMMAND
,CMAKE_VS_DEVENV_COMMAND
, andCMAKE_VS_MSDEV_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 requiresdevenv.com
to build its.vfproj
project files even thoughMSBuild.exe
is normally preferred to support theCMAKE_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
Green Hills MULTI
generator sets this togbuild
. If a user or project explicitly addsCMAKE_MAKE_PROGRAM
to the CMake cache then CMake will use the specified value.
The CMAKE_MAKE_PROGRAM
variable is set for use by project code. The value is also used by the cmake(1)
--build
and ctest(1)
--build-and-test
tools to launch the native build process.
© 2000–2019 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.5/variable/CMAKE_MAKE_PROGRAM.html