blob: ff221efb81ad66d7eb1fdf2f31c03e8d487213a5 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CMAKE_MAKE_PROGRAM &mdash; CMake 3.23.1 Documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="CMAKE_MATCH_COUNT" href="CMAKE_MATCH_COUNT.html" />
<link rel="prev" title="CMAKE_MAJOR_VERSION" href="CMAKE_MAJOR_VERSION.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="CMAKE_MATCH_COUNT.html" title="CMAKE_MATCH_COUNT"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="CMAKE_MAJOR_VERSION.html" title="CMAKE_MAJOR_VERSION"
accesskey="P">previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> &#187;
</li>
<li>
<a href="../index.html">3.23.1 Documentation</a> &#187;
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-variables.7.html" accesskey="U">cmake-variables(7)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">CMAKE_MAKE_PROGRAM</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="cmake-make-program">
<span id="variable:CMAKE_MAKE_PROGRAM"></span><h1>CMAKE_MAKE_PROGRAM<a class="headerlink" href="#cmake-make-program" title="Permalink to this headline">ΒΆ</a></h1>
<p>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 <code class="docutils literal notranslate"><span class="pre">PATH</span></code>.</p>
<p>The tool selected depends on the <span class="target" id="index-0-variable:CMAKE_GENERATOR"></span><a class="reference internal" href="CMAKE_GENERATOR.html#variable:CMAKE_GENERATOR" title="CMAKE_GENERATOR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_GENERATOR</span></code></a> used
to configure the project:</p>
<ul>
<li><p>The <a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a> set this to <code class="docutils literal notranslate"><span class="pre">make</span></code>, <code class="docutils literal notranslate"><span class="pre">gmake</span></code>, or
a generator-specific tool (e.g. <code class="docutils literal notranslate"><span class="pre">nmake</span></code> for <span class="target" id="index-0-generator:NMake Makefiles"></span><a class="reference internal" href="../generator/NMake%20Makefiles.html#generator:NMake Makefiles" title="NMake Makefiles"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">NMake</span> <span class="pre">Makefiles</span></code></a>).</p>
<p>These generators store <code class="docutils literal notranslate"><span class="pre">CMAKE_MAKE_PROGRAM</span></code> in the CMake cache
so that it may be edited by the user.</p>
</li>
<li><p>The <span class="target" id="index-0-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a> generator sets this to <code class="docutils literal notranslate"><span class="pre">ninja</span></code>.</p>
<p>This generator stores <code class="docutils literal notranslate"><span class="pre">CMAKE_MAKE_PROGRAM</span></code> in the CMake cache
so that it may be edited by the user.</p>
</li>
<li><p>The <span class="target" id="index-0-generator:Xcode"></span><a class="reference internal" href="../generator/Xcode.html#generator:Xcode" title="Xcode"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Xcode</span></code></a> generator sets this to <code class="docutils literal notranslate"><span class="pre">xcodebuild</span></code>.</p>
<p>This generator prefers to lookup the build tool at build time
rather than to store <code class="docutils literal notranslate"><span class="pre">CMAKE_MAKE_PROGRAM</span></code> in the CMake cache
ahead of time. This is because <code class="docutils literal notranslate"><span class="pre">xcodebuild</span></code> is easy to find.</p>
<p>For compatibility with versions of CMake prior to 3.2, if
a user or project explicitly adds <code class="docutils literal notranslate"><span class="pre">CMAKE_MAKE_PROGRAM</span></code> to
the CMake cache then CMake will use the specified value.</p>
</li>
<li><p>The <a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a> set this to the full path to
<code class="docutils literal notranslate"><span class="pre">MSBuild.exe</span></code> (VS &gt;= 10), <code class="docutils literal notranslate"><span class="pre">devenv.com</span></code> (VS 7,8,9), or
<code class="docutils literal notranslate"><span class="pre">VCExpress.exe</span></code> (VS Express 8,9).
(See also variables
<span class="target" id="index-0-variable:CMAKE_VS_MSBUILD_COMMAND"></span><a class="reference internal" href="CMAKE_VS_MSBUILD_COMMAND.html#variable:CMAKE_VS_MSBUILD_COMMAND" title="CMAKE_VS_MSBUILD_COMMAND"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_VS_MSBUILD_COMMAND</span></code></a> and
<span class="target" id="index-0-variable:CMAKE_VS_DEVENV_COMMAND"></span><a class="reference internal" href="CMAKE_VS_DEVENV_COMMAND.html#variable:CMAKE_VS_DEVENV_COMMAND" title="CMAKE_VS_DEVENV_COMMAND"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_VS_DEVENV_COMMAND</span></code></a>.</p>
<p>These generators prefer to lookup the build tool at build time
rather than to store <code class="docutils literal notranslate"><span class="pre">CMAKE_MAKE_PROGRAM</span></code> 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 <code class="docutils literal notranslate"><span class="pre">devenv.com</span></code> to build its <code class="docutils literal notranslate"><span class="pre">.vfproj</span></code> project files
even though <code class="docutils literal notranslate"><span class="pre">MSBuild.exe</span></code> is normally preferred to support
the <span class="target" id="index-0-variable:CMAKE_GENERATOR_TOOLSET"></span><a class="reference internal" href="CMAKE_GENERATOR_TOOLSET.html#variable:CMAKE_GENERATOR_TOOLSET" title="CMAKE_GENERATOR_TOOLSET"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_GENERATOR_TOOLSET</span></code></a>).</p>
<p>For compatibility with versions of CMake prior to 3.0, if
a user or project explicitly adds <code class="docutils literal notranslate"><span class="pre">CMAKE_MAKE_PROGRAM</span></code> to
the CMake cache then CMake will use the specified value if
possible.</p>
</li>
<li><p>The <span class="target" id="index-0-generator:Green Hills MULTI"></span><a class="reference internal" href="../generator/Green%20Hills%20MULTI.html#generator:Green Hills MULTI" title="Green Hills MULTI"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Green</span> <span class="pre">Hills</span> <span class="pre">MULTI</span></code></a> generator sets this to the full
path to <code class="docutils literal notranslate"><span class="pre">gbuild.exe(Windows)</span></code> or <code class="docutils literal notranslate"><span class="pre">gbuild(Linux)</span></code> based upon
the toolset being used.</p>
<p>Once the generator has initialized a particular value for this
variable, changing the value has undefined behavior.</p>
</li>
</ul>
<p>The <code class="docutils literal notranslate"><span class="pre">CMAKE_MAKE_PROGRAM</span></code> variable is set for use by project code.
The value is also used by the <span class="target" id="index-0-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake(1)</span></code></a> <code class="docutils literal notranslate"><span class="pre">--build</span></code> and
<span class="target" id="index-0-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a> <code class="docutils literal notranslate"><span class="pre">--build-and-test</span></code> tools to launch the native
build process.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="CMAKE_MAJOR_VERSION.html"
title="previous chapter">CMAKE_MAJOR_VERSION</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="CMAKE_MATCH_COUNT.html"
title="next chapter">CMAKE_MATCH_COUNT</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/variable/CMAKE_MAKE_PROGRAM.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="CMAKE_MATCH_COUNT.html" title="CMAKE_MATCH_COUNT"
>next</a> |</li>
<li class="right" >
<a href="CMAKE_MAJOR_VERSION.html" title="CMAKE_MAJOR_VERSION"
>previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> &#187;
</li>
<li>
<a href="../index.html">3.23.1 Documentation</a> &#187;
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-variables.7.html" >cmake-variables(7)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">CMAKE_MAKE_PROGRAM</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2000-2022 Kitware, Inc. and Contributors.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
</div>
</body>
</html>