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.- nmakefor- NMake Makefiles).- These generators store - CMAKE_MAKE_PROGRAMin the CMake cache so that it may be edited by the user.
- The - Ninjagenerator sets this to- ninja.- This generator stores - CMAKE_MAKE_PROGRAMin the CMake cache so that it may be edited by the user.
- The - Xcodegenerator sets this to- xcodebuild.- This generator prefers to lookup the build tool at build time rather than to store - CMAKE_MAKE_PROGRAMin the CMake cache ahead of time. This is because- xcodebuildis easy to find.- For compatibility with versions of CMake prior to 3.2, if a user or project explicitly adds - CMAKE_MAKE_PROGRAMto the CMake cache then CMake will use the specified value.
- The Visual Studio Generators set this to the full path to - MSBuild.exeor- devenv.com. (See also variables- CMAKE_VS_MSBUILD_COMMANDand- CMAKE_VS_DEVENV_COMMAND.- These generators prefer to lookup the build tool at build time rather than to store - CMAKE_MAKE_PROGRAMin the CMake cache ahead of time. This is because the tools are version-specific and can be located using the Visual Studio Installer. It is also necessary because the proper build tool may depend on the project content (e.g. the Intel Fortran plugin to Visual Studio requires- devenv.comto build its- .vfprojproject files even though- MSBuild.exeis normally preferred to support the- CMAKE_GENERATOR_TOOLSET).- For compatibility with versions of CMake prior to 3.0, if a user or project explicitly adds - CMAKE_MAKE_PROGRAMto the CMake cache then CMake will use the specified value if possible.
- The - Green Hills MULTIgenerator sets this to the full path to- gbuild.exe(Windows)or- gbuild(Linux)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 cmake --build and
ctest --build-and-test tools to launch the native
build process.
