CMAKE_MAKE_PROGRAM.rst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. CMAKE_MAKE_PROGRAM
  2. ------------------
  3. Tool that can launch the native build system.
  4. The value may be the full path to an executable or just the tool
  5. name if it is expected to be in the ``PATH``.
  6. The tool selected depends on the :variable:`CMAKE_GENERATOR` used
  7. to configure the project:
  8. * The Makefile generators set this to ``make``, ``gmake``, or
  9. a generator-specific tool (e.g. ``nmake`` for "NMake Makefiles").
  10. These generators store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  11. so that it may be edited by the user.
  12. * The Ninja generator sets this to ``ninja``.
  13. This generator stores ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  14. so that it may be edited by the user.
  15. * The Xcode generator sets this to ``xcodebuild`` (or possibly an
  16. otherwise undocumented ``cmakexbuild`` wrapper implementing some
  17. workarounds).
  18. This generator prefers to lookup the build tool at build time
  19. rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  20. ahead of time. This is because ``xcodebuild`` is easy to find,
  21. the ``cmakexbuild`` wrapper is needed only for older Xcode versions,
  22. and the path to ``cmakexbuild`` may be outdated if CMake itself moves.
  23. For compatibility with versions of CMake prior to 3.2, if
  24. a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
  25. the CMake cache then CMake will use the specified value.
  26. * The Visual Studio generators set this to the full path to
  27. ``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9),
  28. ``VCExpress.exe`` (VS Express 8,9), or ``msdev.exe`` (VS 6).
  29. (See also variables
  30. :variable:`CMAKE_VS_MSBUILD_COMMAND`,
  31. :variable:`CMAKE_VS_DEVENV_COMMAND`, and
  32. :variable:`CMAKE_VS_MSDEV_COMMAND`.)
  33. These generators prefer to lookup the build tool at build time
  34. rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  35. ahead of time. This is because the tools are version-specific
  36. and can be located using the Windows Registry. It is also
  37. necessary because the proper build tool may depend on the
  38. project content (e.g. the Intel Fortran plugin to VS 10 and 11
  39. requires ``devenv.com`` to build its ``.vfproj`` project files
  40. even though ``MSBuild.exe`` is normally preferred to support
  41. the :variable:`CMAKE_GENERATOR_TOOLSET`).
  42. For compatibility with versions of CMake prior to 3.0, if
  43. a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
  44. the CMake cache then CMake will use the specified value if
  45. possible.
  46. The ``CMAKE_MAKE_PROGRAM`` variable is set for use by project code.
  47. The value is also used by the :manual:`cmake(1)` ``--build`` and
  48. :manual:`ctest(1)` ``--build-and-test`` tools to launch the native
  49. build process.