summaryrefslogtreecommitdiff
path: root/Help/variable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-19 10:55:39 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-19 10:55:39 -0500
commit1da77bf1ee4f3ba315ebb00da2eaeac474614cad (patch)
tree3832a8e9ce070baea6434691201d873bb54f3958 /Help/variable
parent856468213640417d401c6ff70c1f43c1c31145dc (diff)
parent4cce44b6c50a40ee13f423ae311d5db5a66a13f4 (diff)
downloadcmake-1da77bf1ee4f3ba315ebb00da2eaeac474614cad.tar.gz
Merge topic 'cleanup-build-commands'
4cce44b Help: Document the CMAKE_MAKE_PROGRAM variable in more detail 558c74d VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators 5229f2d Tests: Do not use an explicit make program for VS generators 72dd738 Tests: Fix MFC test heuristic for empty CMAKE_TEST_MAKEPROGRAM fd6076d Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram 68031ab Tests: Configure SubProject-Stage2 test more robustly 003d10c Tests: Simplify VSExcludeFromDefaultBuild configuration e47d934 Tests: Simplify VSProjectInSubdir configuration e965cb1 Tests: Simplify CTest.BuildCommand.ProjectInSubdir configuration 72bf255 Tests: Pass --build-options to every test 4d1d772 ctest: Teach --build-options to allow zero options 96966b5 ctest: Make the --build-makeprogram optional for --build-and-test 91a0211 Simplify some calls to cmGlobalGenerator::Build 123a060 Teach GenerateBuildCommand to find its own make program 5f5c92b VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev 4ac75fd Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548) ...
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_BUILD_TOOL.rst11
-rw-r--r--Help/variable/CMAKE_MAKE_PROGRAM.rst50
2 files changed, 50 insertions, 11 deletions
diff --git a/Help/variable/CMAKE_BUILD_TOOL.rst b/Help/variable/CMAKE_BUILD_TOOL.rst
index f0bc938b2d..61334917bb 100644
--- a/Help/variable/CMAKE_BUILD_TOOL.rst
+++ b/Help/variable/CMAKE_BUILD_TOOL.rst
@@ -1,11 +1,6 @@
CMAKE_BUILD_TOOL
----------------
-Tool used for the actual build process.
-
-This variable is set to the program that will be needed to build the
-output of CMake. If the generator selected was Visual Studio 6, the
-CMAKE_BUILD_TOOL will be set to msdev, for Unix Makefiles it will be
-set to make or gmake, and for Visual Studio 7 it set to devenv. For
-NMake Makefiles the value is nmake. This can be useful for adding
-special flags and commands based on the final build environment.
+This variable exists only for backwards compatibility.
+It contains the same value as :variable:`CMAKE_MAKE_PROGRAM`.
+Use that variable instead.
diff --git a/Help/variable/CMAKE_MAKE_PROGRAM.rst b/Help/variable/CMAKE_MAKE_PROGRAM.rst
index 8307bc6362..0c851ad202 100644
--- a/Help/variable/CMAKE_MAKE_PROGRAM.rst
+++ b/Help/variable/CMAKE_MAKE_PROGRAM.rst
@@ -1,7 +1,51 @@
CMAKE_MAKE_PROGRAM
------------------
-See CMAKE_BUILD_TOOL.
+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``.
-This variable is around for backwards compatibility, see
-CMAKE_BUILD_TOOL.
+The tool selected depends on the :variable:`CMAKE_GENERATOR` used
+to configure the project:
+
+* The Makefile generators set this to ``make``, ``gmake``, or
+ a generator-specific tool (e.g. ``nmake`` for "NMake 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 to ``ninja``.
+
+ This generator stores ``CMAKE_MAKE_PROGRAM`` in the CMake cache
+ so that it may be edited by the user.
+
+* The Xcode generator sets this to ``xcodebuild`` (or possibly an
+ otherwise undocumented ``cmakexbuild`` wrapper implementing some
+ workarounds).
+
+ This generator stores ``CMAKE_MAKE_PROGRAM`` in the CMake cache
+ so that it may be edited by the user.
+
+* 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), or ``msdev.exe`` (VS 6).
+
+ 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 ``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.