blob: a59e7f270332dddc9bbc03a67931de084051f80e [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cmake-language(7) &mdash; CMake 3.8.2 Documentation</title>
<link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '3.8.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" 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-server(7)" href="cmake-server.7.html" />
<link rel="prev" title="Sublime Text 2" href="../generator/Sublime Text 2.html" />
</head>
<body role="document">
<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-server.7.html" title="cmake-server(7)"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../generator/Sublime Text 2.html" title="Sublime Text 2"
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.8.2 Documentation</a> &#187;
</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<span class="target" id="manual:cmake-language(7)"></span><div class="section" id="cmake-language-7">
<h1><a class="toc-backref" href="#id9">cmake-language(7)</a><a class="headerlink" href="#cmake-language-7" title="Permalink to this headline"></a></h1>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#cmake-language-7" id="id9">cmake-language(7)</a><ul>
<li><a class="reference internal" href="#organization" id="id10">Organization</a><ul>
<li><a class="reference internal" href="#directories" id="id11">Directories</a></li>
<li><a class="reference internal" href="#scripts" id="id12">Scripts</a></li>
<li><a class="reference internal" href="#modules" id="id13">Modules</a></li>
</ul>
</li>
<li><a class="reference internal" href="#syntax" id="id14">Syntax</a><ul>
<li><a class="reference internal" href="#encoding" id="id15">Encoding</a></li>
<li><a class="reference internal" href="#source-files" id="id16">Source Files</a></li>
<li><a class="reference internal" href="#command-invocations" id="id17">Command Invocations</a></li>
<li><a class="reference internal" href="#command-arguments" id="id18">Command Arguments</a><ul>
<li><a class="reference internal" href="#bracket-argument" id="id19">Bracket Argument</a></li>
<li><a class="reference internal" href="#quoted-argument" id="id20">Quoted Argument</a></li>
<li><a class="reference internal" href="#unquoted-argument" id="id21">Unquoted Argument</a></li>
</ul>
</li>
<li><a class="reference internal" href="#escape-sequences" id="id22">Escape Sequences</a></li>
<li><a class="reference internal" href="#variable-references" id="id23">Variable References</a></li>
<li><a class="reference internal" href="#comments" id="id24">Comments</a><ul>
<li><a class="reference internal" href="#bracket-comment" id="id25">Bracket Comment</a></li>
<li><a class="reference internal" href="#line-comment" id="id26">Line Comment</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#control-structures" id="id27">Control Structures</a><ul>
<li><a class="reference internal" href="#conditional-blocks" id="id28">Conditional Blocks</a></li>
<li><a class="reference internal" href="#loops" id="id29">Loops</a></li>
<li><a class="reference internal" href="#command-definitions" id="id30">Command Definitions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#variables" id="id31">Variables</a></li>
<li><a class="reference internal" href="#lists" id="id32">Lists</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="organization">
<h2><a class="toc-backref" href="#id10">Organization</a><a class="headerlink" href="#organization" title="Permalink to this headline"></a></h2>
<p>CMake input files are written in the &#8220;CMake Language&#8221; in source files
named <code class="docutils literal"><span class="pre">CMakeLists.txt</span></code> or ending in a <code class="docutils literal"><span class="pre">.cmake</span></code> file name extension.</p>
<p>CMake Language source files in a project are organized into:</p>
<ul class="simple">
<li><a class="reference internal" href="#directories">Directories</a> (<code class="docutils literal"><span class="pre">CMakeLists.txt</span></code>),</li>
<li><a class="reference internal" href="#scripts">Scripts</a> (<code class="docutils literal"><span class="pre">&lt;script&gt;.cmake</span></code>), and</li>
<li><a class="reference internal" href="#modules">Modules</a> (<code class="docutils literal"><span class="pre">&lt;module&gt;.cmake</span></code>).</li>
</ul>
<div class="section" id="directories">
<h3><a class="toc-backref" href="#id11">Directories</a><a class="headerlink" href="#directories" title="Permalink to this headline"></a></h3>
<p>When CMake processes a project source tree, the entry point is
a source file called <code class="docutils literal"><span class="pre">CMakeLists.txt</span></code> in the top-level source
directory. This file may contain the entire build specification
or use the <span class="target" id="index-0-command:add_subdirectory"></span><a class="reference internal" href="../command/add_subdirectory.html#command:add_subdirectory" title="add_subdirectory"><code class="xref cmake cmake-command docutils literal"><span class="pre">add_subdirectory()</span></code></a> command to add subdirectories
to the build. Each subdirectory added by the command must also
contain a <code class="docutils literal"><span class="pre">CMakeLists.txt</span></code> file as the entry point to that
directory. For each source directory whose <code class="docutils literal"><span class="pre">CMakeLists.txt</span></code> file
is processed CMake generates a corresponding directory in the build
tree to act as the default working and output directory.</p>
</div>
<div class="section" id="scripts">
<h3><a class="toc-backref" href="#id12">Scripts</a><a class="headerlink" href="#scripts" title="Permalink to this headline"></a></h3>
<p>An individual <code class="docutils literal"><span class="pre">&lt;script&gt;.cmake</span></code> source file may be processed
in <em>script mode</em> by using the <span class="target" id="index-0-manual:cmake(1)"></span><a class="reference internal" href="cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal"><span class="pre">cmake(1)</span></code></a> command-line tool
with the <code class="docutils literal"><span class="pre">-P</span></code> option. Script mode simply runs the commands in
the given CMake Language source file and does not generate a
build system. It does not allow CMake commands that define build
targets or actions.</p>
</div>
<div class="section" id="modules">
<h3><a class="toc-backref" href="#id13">Modules</a><a class="headerlink" href="#modules" title="Permalink to this headline"></a></h3>
<p>CMake Language code in either <a class="reference internal" href="#directories">Directories</a> or <a class="reference internal" href="#scripts">Scripts</a> may
use the <span class="target" id="index-0-command:include"></span><a class="reference internal" href="../command/include.html#command:include" title="include"><code class="xref cmake cmake-command docutils literal"><span class="pre">include()</span></code></a> command to load a <code class="docutils literal"><span class="pre">&lt;module&gt;.cmake</span></code>
source file in the scope of the including context.
See the <span class="target" id="index-0-manual:cmake-modules(7)"></span><a class="reference internal" href="cmake-modules.7.html#manual:cmake-modules(7)" title="cmake-modules(7)"><code class="xref cmake cmake-manual docutils literal"><span class="pre">cmake-modules(7)</span></code></a> manual page for documentation
of modules included with the CMake distribution.
Project source trees may also provide their own modules and
specify their location(s) in the <span class="target" id="index-0-variable:CMAKE_MODULE_PATH"></span><a class="reference internal" href="../variable/CMAKE_MODULE_PATH.html#variable:CMAKE_MODULE_PATH" title="CMAKE_MODULE_PATH"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_MODULE_PATH</span></code></a>
variable.</p>
</div>
</div>
<div class="section" id="syntax">
<h2><a class="toc-backref" href="#id14">Syntax</a><a class="headerlink" href="#syntax" title="Permalink to this headline"></a></h2>
<div class="section" id="encoding">
<span id="cmake-language-encoding"></span><h3><a class="toc-backref" href="#id15">Encoding</a><a class="headerlink" href="#encoding" title="Permalink to this headline"></a></h3>
<p>A CMake Language source file may be written in 7-bit ASCII text for
maximum portability across all supported platforms. Newlines may be
encoded as either <code class="docutils literal"><span class="pre">\n</span></code> or <code class="docutils literal"><span class="pre">\r\n</span></code> but will be converted to <code class="docutils literal"><span class="pre">\n</span></code>
as input files are read.</p>
<p>Note that the implementation is 8-bit clean so source files may
be encoded as UTF-8 on platforms with system APIs supporting this
encoding. In addition, CMake 3.2 and above support source files
encoded in UTF-8 on Windows (using UTF-16 to call system APIs).
Furthermore, CMake 3.0 and above allow a leading UTF-8
<a class="reference external" href="http://en.wikipedia.org/wiki/Byte_order_mark">Byte-Order Mark</a> in source files.</p>
</div>
<div class="section" id="source-files">
<h3><a class="toc-backref" href="#id16">Source Files</a><a class="headerlink" href="#source-files" title="Permalink to this headline"></a></h3>
<p>A CMake Language source file consists of zero or more
<a class="reference internal" href="#command-invocations">Command Invocations</a> separated by newlines and optionally
spaces and <a class="reference internal" href="#comments">Comments</a>:</p>
<pre>
<strong id="grammar-token-file">file </strong> ::= <a class="reference internal" href="#grammar-token-file_element"><code class="xref docutils literal"><span class="pre">file_element</span></code></a>*
<strong id="grammar-token-file_element">file_element</strong> ::= <a class="reference internal" href="#grammar-token-command_invocation"><code class="xref docutils literal"><span class="pre">command_invocation</span></code></a> <a class="reference internal" href="#grammar-token-line_ending"><code class="xref docutils literal"><span class="pre">line_ending</span></code></a> |
(<a class="reference internal" href="#grammar-token-bracket_comment"><code class="xref docutils literal"><span class="pre">bracket_comment</span></code></a>|<a class="reference internal" href="#grammar-token-space"><code class="xref docutils literal"><span class="pre">space</span></code></a>)* <a class="reference internal" href="#grammar-token-line_ending"><code class="xref docutils literal"><span class="pre">line_ending</span></code></a>
<strong id="grammar-token-line_ending">line_ending </strong> ::= <a class="reference internal" href="#grammar-token-line_comment"><code class="xref docutils literal"><span class="pre">line_comment</span></code></a>? <a class="reference internal" href="#grammar-token-newline"><code class="xref docutils literal"><span class="pre">newline</span></code></a>
<strong id="grammar-token-space">space </strong> ::= &lt;match '[ \t]+'&gt;
<strong id="grammar-token-newline">newline </strong> ::= &lt;match '\n'&gt;
</pre>
<p>Note that any source file line not inside <a class="reference internal" href="#command-arguments">Command Arguments</a> or
a <a class="reference internal" href="#bracket-comment">Bracket Comment</a> can end in a <a class="reference internal" href="#line-comment">Line Comment</a>.</p>
</div>
<div class="section" id="command-invocations">
<span id="id1"></span><h3><a class="toc-backref" href="#id17">Command Invocations</a><a class="headerlink" href="#command-invocations" title="Permalink to this headline"></a></h3>
<p>A <em>command invocation</em> is a name followed by paren-enclosed arguments
separated by whitespace:</p>
<pre>
<strong id="grammar-token-command_invocation">command_invocation </strong> ::= <a class="reference internal" href="#grammar-token-space"><code class="xref docutils literal"><span class="pre">space</span></code></a>* <a class="reference internal" href="#grammar-token-identifier"><code class="xref docutils literal"><span class="pre">identifier</span></code></a> <a class="reference internal" href="#grammar-token-space"><code class="xref docutils literal"><span class="pre">space</span></code></a>* '(' <a class="reference internal" href="#grammar-token-arguments"><code class="xref docutils literal"><span class="pre">arguments</span></code></a> ')'
<strong id="grammar-token-identifier">identifier </strong> ::= &lt;match '[A-Za-z_][A-Za-z0-9_]*'&gt;
<strong id="grammar-token-arguments">arguments </strong> ::= <a class="reference internal" href="#grammar-token-argument"><code class="xref docutils literal"><span class="pre">argument</span></code></a>? <a class="reference internal" href="#grammar-token-separated_arguments"><code class="xref docutils literal"><span class="pre">separated_arguments</span></code></a>*
<strong id="grammar-token-separated_arguments">separated_arguments</strong> ::= <a class="reference internal" href="#grammar-token-separation"><code class="xref docutils literal"><span class="pre">separation</span></code></a>+ <a class="reference internal" href="#grammar-token-argument"><code class="xref docutils literal"><span class="pre">argument</span></code></a>? |
<a class="reference internal" href="#grammar-token-separation"><code class="xref docutils literal"><span class="pre">separation</span></code></a>* '(' <a class="reference internal" href="#grammar-token-arguments"><code class="xref docutils literal"><span class="pre">arguments</span></code></a> ')'
<strong id="grammar-token-separation">separation </strong> ::= <a class="reference internal" href="#grammar-token-space"><code class="xref docutils literal"><span class="pre">space</span></code></a> | <a class="reference internal" href="#grammar-token-line_ending"><code class="xref docutils literal"><span class="pre">line_ending</span></code></a>
</pre>
<p>For example:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="nb">add_executable</span><span class="p">(</span><span class="s">hello</span> <span class="s">world.c</span><span class="p">)</span>
</pre></div>
</div>
<p>Command names are case-insensitive.
Nested unquoted parentheses in the arguments must balance.
Each <code class="docutils literal"><span class="pre">(</span></code> or <code class="docutils literal"><span class="pre">)</span></code> is given to the command invocation as
a literal <a class="reference internal" href="#unquoted-argument">Unquoted Argument</a>. This may be used in calls
to the <span class="target" id="index-0-command:if"></span><a class="reference internal" href="../command/if.html#command:if" title="if"><code class="xref cmake cmake-command docutils literal"><span class="pre">if()</span></code></a> command to enclose conditions.
For example:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="nb">if</span><span class="p">(</span><span class="s">FALSE</span> <span class="s">AND</span> <span class="p">(</span><span class="s">FALSE</span> <span class="s">OR</span> <span class="s">TRUE</span><span class="p">))</span> <span class="c"># evaluates to FALSE</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>CMake versions prior to 3.0 require command name identifiers
to be at least 2 characters.</p>
<p class="last">CMake versions prior to 2.8.12 silently accept an <a class="reference internal" href="#unquoted-argument">Unquoted Argument</a>
or a <a class="reference internal" href="#quoted-argument">Quoted Argument</a> immediately following a <a class="reference internal" href="#quoted-argument">Quoted Argument</a> and
not separated by any whitespace. For compatibility, CMake 2.8.12 and
higher accept such code but produce a warning.</p>
</div>
</div>
<div class="section" id="command-arguments">
<h3><a class="toc-backref" href="#id18">Command Arguments</a><a class="headerlink" href="#command-arguments" title="Permalink to this headline"></a></h3>
<p>There are three types of arguments within <a class="reference internal" href="#command-invocations">Command Invocations</a>:</p>
<pre>
<strong id="grammar-token-argument">argument</strong> ::= <a class="reference internal" href="#grammar-token-bracket_argument"><code class="xref docutils literal"><span class="pre">bracket_argument</span></code></a> | <a class="reference internal" href="#grammar-token-quoted_argument"><code class="xref docutils literal"><span class="pre">quoted_argument</span></code></a> | <a class="reference internal" href="#grammar-token-unquoted_argument"><code class="xref docutils literal"><span class="pre">unquoted_argument</span></code></a>
</pre>
<div class="section" id="bracket-argument">
<span id="id2"></span><h4><a class="toc-backref" href="#id19">Bracket Argument</a><a class="headerlink" href="#bracket-argument" title="Permalink to this headline"></a></h4>
<p>A <em>bracket argument</em>, inspired by <a class="reference external" href="http://www.lua.org/">Lua</a> long bracket syntax,
encloses content between opening and closing &#8220;brackets&#8221; of the
same length:</p>
<pre>
<strong id="grammar-token-bracket_argument">bracket_argument</strong> ::= <a class="reference internal" href="#grammar-token-bracket_open"><code class="xref docutils literal"><span class="pre">bracket_open</span></code></a> <a class="reference internal" href="#grammar-token-bracket_content"><code class="xref docutils literal"><span class="pre">bracket_content</span></code></a> <a class="reference internal" href="#grammar-token-bracket_close"><code class="xref docutils literal"><span class="pre">bracket_close</span></code></a>
<strong id="grammar-token-bracket_open">bracket_open </strong> ::= '[' '='{len} '['
<strong id="grammar-token-bracket_content">bracket_content </strong> ::= &lt;any text not containing a <a class="reference internal" href="#grammar-token-bracket_close"><code class="xref docutils literal"><span class="pre">bracket_close</span></code></a>
of the same {len} as the <a class="reference internal" href="#grammar-token-bracket_open"><code class="xref docutils literal"><span class="pre">bracket_open</span></code></a>&gt;
<strong id="grammar-token-bracket_close">bracket_close </strong> ::= ']' '='{len} ']'
</pre>
<p>An opening bracket of length <em>len &gt;= 0</em> is written <code class="docutils literal"><span class="pre">[</span></code> followed
by <em>len</em> <code class="docutils literal"><span class="pre">=</span></code> followed by <code class="docutils literal"><span class="pre">[</span></code> and the corresponding closing
bracket is written <code class="docutils literal"><span class="pre">]</span></code> followed by <em>len</em> <code class="docutils literal"><span class="pre">=</span></code> followed by <code class="docutils literal"><span class="pre">]</span></code>.
Brackets do not nest. A unique length may always be chosen
for the opening and closing brackets to contain closing brackets
of other lengths.</p>
<p>Bracket argument content consists of all text between the opening
and closing brackets, except that one newline immediately following
the opening bracket, if any, is ignored. No evaluation of the
enclosed content, such as <a class="reference internal" href="#escape-sequences">Escape Sequences</a> or <a class="reference internal" href="#variable-references">Variable References</a>,
is performed. A bracket argument is always given to the command
invocation as exactly one argument.</p>
<p>For example:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="nb">message</span><span class="p">(</span><span class="s">[=[</span>
<span class="s">This</span> <span class="s">is</span> <span class="s">the</span> <span class="s">first</span> <span class="s">line</span> <span class="s">in</span> <span class="s">a</span> <span class="s">bracket</span> <span class="s">argument</span> <span class="s">with</span> <span class="s">bracket</span> <span class="s">length</span> <span class="s">1.</span>
<span class="s">No</span> <span class="s">\-escape</span> <span class="s">sequences</span> <span class="s">or</span> <span class="o">${</span><span class="nv">variable</span><span class="o">}</span> <span class="s">references</span> <span class="s">are</span> <span class="s">evaluated.</span>
<span class="s">This</span> <span class="s">is</span> <span class="s">always</span> <span class="s">one</span> <span class="s">argument</span> <span class="s">even</span> <span class="s">though</span> <span class="s">it</span> <span class="s">contains</span> <span class="s">a</span> <span class="s">;</span> <span class="s">character.</span>
<span class="s">The</span> <span class="s">text</span> <span class="s">does</span> <span class="s">not</span> <span class="s">end</span> <span class="s">on</span> <span class="s">a</span> <span class="s">closing</span> <span class="s">bracket</span> <span class="s">of</span> <span class="s">length</span> <span class="s">0</span> <span class="s">like</span> <span class="s">]].</span>
<span class="s">It</span> <span class="s">does</span> <span class="s">end</span> <span class="s">in</span> <span class="s">a</span> <span class="s">closing</span> <span class="s">bracket</span> <span class="s">of</span> <span class="s">length</span> <span class="s">1.</span>
<span class="s">]=]</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">CMake versions prior to 3.0 do not support bracket arguments.
They interpret the opening bracket as the start of an
<a class="reference internal" href="#unquoted-argument">Unquoted Argument</a>.</p>
</div>
</div>
<div class="section" id="quoted-argument">
<span id="id3"></span><h4><a class="toc-backref" href="#id20">Quoted Argument</a><a class="headerlink" href="#quoted-argument" title="Permalink to this headline"></a></h4>
<p>A <em>quoted argument</em> encloses content between opening and closing
double-quote characters:</p>
<pre>
<strong id="grammar-token-quoted_argument">quoted_argument </strong> ::= '&quot;' <a class="reference internal" href="#grammar-token-quoted_element"><code class="xref docutils literal"><span class="pre">quoted_element</span></code></a>* '&quot;'
<strong id="grammar-token-quoted_element">quoted_element </strong> ::= &lt;any character except '\' or '&quot;'&gt; |
<a class="reference internal" href="#grammar-token-escape_sequence"><code class="xref docutils literal"><span class="pre">escape_sequence</span></code></a> |
<a class="reference internal" href="#grammar-token-quoted_continuation"><code class="xref docutils literal"><span class="pre">quoted_continuation</span></code></a>
<strong id="grammar-token-quoted_continuation">quoted_continuation</strong> ::= '\' <a class="reference internal" href="#grammar-token-newline"><code class="xref docutils literal"><span class="pre">newline</span></code></a>
</pre>
<p>Quoted argument content consists of all text between opening and
closing quotes. Both <a class="reference internal" href="#escape-sequences">Escape Sequences</a> and <a class="reference internal" href="#variable-references">Variable References</a>
are evaluated. A quoted argument is always given to the command
invocation as exactly one argument.</p>
<p>For example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>message(&quot;This is a quoted argument containing multiple lines.
This is always one argument even though it contains a ; character.
Both \\-escape sequences and ${variable} references are evaluated.
The text does not end on an escaped double-quote like \&quot;.
It does end in an unescaped double quote.
&quot;)
</pre></div>
</div>
<p>The final <code class="docutils literal"><span class="pre">\</span></code> on any line ending in an odd number of backslashes
is treated as a line continuation and ignored along with the
immediately following newline character. For example:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="nb">message</span><span class="p">(</span><span class="s2">&quot;\</span>
<span class="s2">This is the first line of a quoted argument. \</span>
<span class="s2">In fact it is the only line but since it is long \</span>
<span class="s2">the source code uses line continuation.\</span>
<span class="s2">&quot;</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">CMake versions prior to 3.0 do not support continuation with <code class="docutils literal"><span class="pre">\</span></code>.
They report errors in quoted arguments containing lines ending in
an odd number of <code class="docutils literal"><span class="pre">\</span></code> characters.</p>
</div>
</div>
<div class="section" id="unquoted-argument">
<span id="id4"></span><h4><a class="toc-backref" href="#id21">Unquoted Argument</a><a class="headerlink" href="#unquoted-argument" title="Permalink to this headline"></a></h4>
<p>An <em>unquoted argument</em> is not enclosed by any quoting syntax.
It may not contain any whitespace, <code class="docutils literal"><span class="pre">(</span></code>, <code class="docutils literal"><span class="pre">)</span></code>, <code class="docutils literal"><span class="pre">#</span></code>, <code class="docutils literal"><span class="pre">&quot;</span></code>, or <code class="docutils literal"><span class="pre">\</span></code>
except when escaped by a backslash:</p>
<pre>
<strong id="grammar-token-unquoted_argument">unquoted_argument</strong> ::= <a class="reference internal" href="#grammar-token-unquoted_element"><code class="xref docutils literal"><span class="pre">unquoted_element</span></code></a>+ | <a class="reference internal" href="#grammar-token-unquoted_legacy"><code class="xref docutils literal"><span class="pre">unquoted_legacy</span></code></a>
<strong id="grammar-token-unquoted_element">unquoted_element </strong> ::= &lt;any character except whitespace or one of '()#&quot;\'&gt; |
<a class="reference internal" href="#grammar-token-escape_sequence"><code class="xref docutils literal"><span class="pre">escape_sequence</span></code></a>
<strong id="grammar-token-unquoted_legacy">unquoted_legacy </strong> ::= &lt;see note in text&gt;
</pre>
<p>Unquoted argument content consists of all text in a contiguous block
of allowed or escaped characters. Both <a class="reference internal" href="#escape-sequences">Escape Sequences</a> and
<a class="reference internal" href="#variable-references">Variable References</a> are evaluated. The resulting value is divided
in the same way <a class="reference internal" href="#lists">Lists</a> divide into elements. Each non-empty element
is given to the command invocation as an argument. Therefore an
unquoted argument may be given to a command invocation as zero or
more arguments.</p>
<p>For example:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="nb">foreach</span><span class="p">(</span><span class="s">arg</span>
<span class="s">NoSpace</span>
<span class="s">Escaped\</span> <span class="s">Space</span>
<span class="s">This;Divides;Into;Five;Arguments</span>
<span class="s">Escaped\;Semicolon</span>
<span class="p">)</span>
<span class="nb">message</span><span class="p">(</span><span class="s2">&quot;${arg}&quot;</span><span class="p">)</span>
<span class="nb">endforeach</span><span class="p">()</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>To support legacy CMake code, unquoted arguments may also contain
double-quoted strings (<code class="docutils literal"><span class="pre">&quot;...&quot;</span></code>, possibly enclosing horizontal
whitespace), and make-style variable references (<code class="docutils literal"><span class="pre">$(MAKEVAR)</span></code>).</p>
<p>Unescaped double-quotes must balance, may not appear at the
beginning of an unquoted argument, and are treated as part of the
content. For example, the unquoted arguments <code class="docutils literal"><span class="pre">-Da=&quot;b</span> <span class="pre">c&quot;</span></code>,
<code class="docutils literal"><span class="pre">-Da=$(v)</span></code>, and <code class="docutils literal"><span class="pre">a&quot;</span> <span class="pre">&quot;b&quot;c&quot;d</span></code> are each interpreted literally.</p>
<p>Make-style references are treated literally as part of the content
and do not undergo variable expansion. They are treated as part
of a single argument (rather than as separate <code class="docutils literal"><span class="pre">$</span></code>, <code class="docutils literal"><span class="pre">(</span></code>,
<code class="docutils literal"><span class="pre">MAKEVAR</span></code>, and <code class="docutils literal"><span class="pre">)</span></code> arguments).</p>
<p class="last">The above &#8220;unquoted_legacy&#8221; production represents such arguments.
We do not recommend using legacy unquoted arguments in new code.
Instead use a <a class="reference internal" href="#quoted-argument">Quoted Argument</a> or a <a class="reference internal" href="#bracket-argument">Bracket Argument</a> to
represent the content.</p>
</div>
</div>
</div>
<div class="section" id="escape-sequences">
<span id="id5"></span><h3><a class="toc-backref" href="#id22">Escape Sequences</a><a class="headerlink" href="#escape-sequences" title="Permalink to this headline"></a></h3>
<p>An <em>escape sequence</em> is a <code class="docutils literal"><span class="pre">\</span></code> followed by one character:</p>
<pre>
<strong id="grammar-token-escape_sequence">escape_sequence </strong> ::= <a class="reference internal" href="#grammar-token-escape_identity"><code class="xref docutils literal"><span class="pre">escape_identity</span></code></a> | <a class="reference internal" href="#grammar-token-escape_encoded"><code class="xref docutils literal"><span class="pre">escape_encoded</span></code></a> | <a class="reference internal" href="#grammar-token-escape_semicolon"><code class="xref docutils literal"><span class="pre">escape_semicolon</span></code></a>
<strong id="grammar-token-escape_identity">escape_identity </strong> ::= '\' &lt;match '[^A-Za-z0-9;]'&gt;
<strong id="grammar-token-escape_encoded">escape_encoded </strong> ::= '\t' | '\r' | '\n'
<strong id="grammar-token-escape_semicolon">escape_semicolon</strong> ::= '\;'
</pre>
<p>A <code class="docutils literal"><span class="pre">\</span></code> followed by a non-alphanumeric character simply encodes the literal
character without interpreting it as syntax. A <code class="docutils literal"><span class="pre">\t</span></code>, <code class="docutils literal"><span class="pre">\r</span></code>, or <code class="docutils literal"><span class="pre">\n</span></code>
encodes a tab, carriage return, or newline character, respectively. A <code class="docutils literal"><span class="pre">\;</span></code>
outside of any <a class="reference internal" href="#variable-references">Variable References</a> encodes itself but may be used in an
<a class="reference internal" href="#unquoted-argument">Unquoted Argument</a> to encode the <code class="docutils literal"><span class="pre">;</span></code> without dividing the argument
value on it. A <code class="docutils literal"><span class="pre">\;</span></code> inside <a class="reference internal" href="#variable-references">Variable References</a> encodes the literal
<code class="docutils literal"><span class="pre">;</span></code> character. (See also policy <span class="target" id="index-0-policy:CMP0053"></span><a class="reference internal" href="../policy/CMP0053.html#policy:CMP0053" title="CMP0053"><code class="xref cmake cmake-policy docutils literal"><span class="pre">CMP0053</span></code></a> documentation for
historical considerations.)</p>
</div>
<div class="section" id="variable-references">
<span id="id6"></span><h3><a class="toc-backref" href="#id23">Variable References</a><a class="headerlink" href="#variable-references" title="Permalink to this headline"></a></h3>
<p>A <em>variable reference</em> has the form <code class="docutils literal"><span class="pre">${variable_name}</span></code> and is
evaluated inside a <a class="reference internal" href="#quoted-argument">Quoted Argument</a> or an <a class="reference internal" href="#unquoted-argument">Unquoted Argument</a>.
A variable reference is replaced by the value of the variable,
or by the empty string if the variable is not set.
Variable references can nest and are evaluated from the
inside out, e.g. <code class="docutils literal"><span class="pre">${outer_${inner_variable}_variable}</span></code>.</p>
<p>Literal variable references may consist of alphanumeric characters,
the characters <code class="docutils literal"><span class="pre">/_.+-</span></code>, and <a class="reference internal" href="#escape-sequences">Escape Sequences</a>. Nested references
may be used to evaluate variables of any name. (See also policy
<span class="target" id="index-1-policy:CMP0053"></span><a class="reference internal" href="../policy/CMP0053.html#policy:CMP0053" title="CMP0053"><code class="xref cmake cmake-policy docutils literal"><span class="pre">CMP0053</span></code></a> documentation for historical considerations.)</p>
<p>The <a class="reference internal" href="#variables">Variables</a> section documents the scope of variable names
and how their values are set.</p>
<p>An <em>environment variable reference</em> has the form <code class="docutils literal"><span class="pre">$ENV{VAR}</span></code> and
is evaluated in the same contexts as a normal variable reference.</p>
</div>
<div class="section" id="comments">
<h3><a class="toc-backref" href="#id24">Comments</a><a class="headerlink" href="#comments" title="Permalink to this headline"></a></h3>
<p>A comment starts with a <code class="docutils literal"><span class="pre">#</span></code> character that is not inside a
<a class="reference internal" href="#bracket-argument">Bracket Argument</a>, <a class="reference internal" href="#quoted-argument">Quoted Argument</a>, or escaped with <code class="docutils literal"><span class="pre">\</span></code>
as part of an <a class="reference internal" href="#unquoted-argument">Unquoted Argument</a>. There are two types of
comments: a <a class="reference internal" href="#bracket-comment">Bracket Comment</a> and a <a class="reference internal" href="#line-comment">Line Comment</a>.</p>
<div class="section" id="bracket-comment">
<span id="id7"></span><h4><a class="toc-backref" href="#id25">Bracket Comment</a><a class="headerlink" href="#bracket-comment" title="Permalink to this headline"></a></h4>
<p>A <code class="docutils literal"><span class="pre">#</span></code> immediately followed by a <a class="reference internal" href="#bracket-argument">Bracket Argument</a> forms a
<em>bracket comment</em> consisting of the entire bracket enclosure:</p>
<pre>
<strong id="grammar-token-bracket_comment">bracket_comment</strong> ::= '#' <a class="reference internal" href="#grammar-token-bracket_argument"><code class="xref docutils literal"><span class="pre">bracket_argument</span></code></a>
</pre>
<p>For example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1">#[[This is a bracket comment.</span>
<span class="n">It</span> <span class="n">runs</span> <span class="n">until</span> <span class="n">the</span> <span class="n">close</span> <span class="n">bracket</span><span class="o">.</span><span class="p">]]</span>
<span class="n">message</span><span class="p">(</span><span class="s2">&quot;First Argument</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="c1">#[[Bracket Comment]] &quot;Second Argument&quot;)</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">CMake versions prior to 3.0 do not support bracket comments.
They interpret the opening <code class="docutils literal"><span class="pre">#</span></code> as the start of a <a class="reference internal" href="#line-comment">Line Comment</a>.</p>
</div>
</div>
<div class="section" id="line-comment">
<span id="id8"></span><h4><a class="toc-backref" href="#id26">Line Comment</a><a class="headerlink" href="#line-comment" title="Permalink to this headline"></a></h4>
<p>A <code class="docutils literal"><span class="pre">#</span></code> not immediately followed by a <a class="reference internal" href="#bracket-argument">Bracket Argument</a> forms a
<em>line comment</em> that runs until the end of the line:</p>
<pre>
<strong id="grammar-token-line_comment">line_comment</strong> ::= '#' &lt;any text not starting in a <a class="reference internal" href="#grammar-token-bracket_argument"><code class="xref docutils literal"><span class="pre">bracket_argument</span></code></a>
and not containing a <a class="reference internal" href="#grammar-token-newline"><code class="xref docutils literal"><span class="pre">newline</span></code></a>&gt;
</pre>
<p>For example:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="c"># This is a line comment.</span>
<span class="nb">message</span><span class="p">(</span><span class="s2">&quot;First Argument\n&quot;</span> <span class="c"># This is a line comment :)</span>
<span class="s2">&quot;Second Argument&quot;</span><span class="p">)</span> <span class="c"># This is a line comment.</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="control-structures">
<h2><a class="toc-backref" href="#id27">Control Structures</a><a class="headerlink" href="#control-structures" title="Permalink to this headline"></a></h2>
<div class="section" id="conditional-blocks">
<h3><a class="toc-backref" href="#id28">Conditional Blocks</a><a class="headerlink" href="#conditional-blocks" title="Permalink to this headline"></a></h3>
<p>The <span class="target" id="index-1-command:if"></span><a class="reference internal" href="../command/if.html#command:if" title="if"><code class="xref cmake cmake-command docutils literal"><span class="pre">if()</span></code></a>/<span class="target" id="index-0-command:elseif"></span><a class="reference internal" href="../command/elseif.html#command:elseif" title="elseif"><code class="xref cmake cmake-command docutils literal"><span class="pre">elseif()</span></code></a>/<span class="target" id="index-0-command:else"></span><a class="reference internal" href="../command/else.html#command:else" title="else"><code class="xref cmake cmake-command docutils literal"><span class="pre">else()</span></code></a>/<span class="target" id="index-0-command:endif"></span><a class="reference internal" href="../command/endif.html#command:endif" title="endif"><code class="xref cmake cmake-command docutils literal"><span class="pre">endif()</span></code></a>
commands delimit code blocks to be executed conditionally.</p>
</div>
<div class="section" id="loops">
<h3><a class="toc-backref" href="#id29">Loops</a><a class="headerlink" href="#loops" title="Permalink to this headline"></a></h3>
<p>The <span class="target" id="index-0-command:foreach"></span><a class="reference internal" href="../command/foreach.html#command:foreach" title="foreach"><code class="xref cmake cmake-command docutils literal"><span class="pre">foreach()</span></code></a>/<span class="target" id="index-0-command:endforeach"></span><a class="reference internal" href="../command/endforeach.html#command:endforeach" title="endforeach"><code class="xref cmake cmake-command docutils literal"><span class="pre">endforeach()</span></code></a> and
<span class="target" id="index-0-command:while"></span><a class="reference internal" href="../command/while.html#command:while" title="while"><code class="xref cmake cmake-command docutils literal"><span class="pre">while()</span></code></a>/<span class="target" id="index-0-command:endwhile"></span><a class="reference internal" href="../command/endwhile.html#command:endwhile" title="endwhile"><code class="xref cmake cmake-command docutils literal"><span class="pre">endwhile()</span></code></a> commands delimit code
blocks to be executed in a loop. Inside such blocks the
<span class="target" id="index-0-command:break"></span><a class="reference internal" href="../command/break.html#command:break" title="break"><code class="xref cmake cmake-command docutils literal"><span class="pre">break()</span></code></a> command may be used to terminate the loop
early whereas the <span class="target" id="index-0-command:continue"></span><a class="reference internal" href="../command/continue.html#command:continue" title="continue"><code class="xref cmake cmake-command docutils literal"><span class="pre">continue()</span></code></a> command may be used
to start with the next iteration immediately.</p>
</div>
<div class="section" id="command-definitions">
<h3><a class="toc-backref" href="#id30">Command Definitions</a><a class="headerlink" href="#command-definitions" title="Permalink to this headline"></a></h3>
<p>The <span class="target" id="index-0-command:macro"></span><a class="reference internal" href="../command/macro.html#command:macro" title="macro"><code class="xref cmake cmake-command docutils literal"><span class="pre">macro()</span></code></a>/<span class="target" id="index-0-command:endmacro"></span><a class="reference internal" href="../command/endmacro.html#command:endmacro" title="endmacro"><code class="xref cmake cmake-command docutils literal"><span class="pre">endmacro()</span></code></a>, and
<span class="target" id="index-0-command:function"></span><a class="reference internal" href="../command/function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal"><span class="pre">function()</span></code></a>/<span class="target" id="index-0-command:endfunction"></span><a class="reference internal" href="../command/endfunction.html#command:endfunction" title="endfunction"><code class="xref cmake cmake-command docutils literal"><span class="pre">endfunction()</span></code></a> commands delimit
code blocks to be recorded for later invocation as commands.</p>
</div>
</div>
<div class="section" id="variables">
<span id="cmake-language-variables"></span><h2><a class="toc-backref" href="#id31">Variables</a><a class="headerlink" href="#variables" title="Permalink to this headline"></a></h2>
<p>Variables are the basic unit of storage in the CMake Language.
Their values are always of string type, though some commands may
interpret the strings as values of other types.
The <span class="target" id="index-0-command:set"></span><a class="reference internal" href="../command/set.html#command:set" title="set"><code class="xref cmake cmake-command docutils literal"><span class="pre">set()</span></code></a> and <span class="target" id="index-0-command:unset"></span><a class="reference internal" href="../command/unset.html#command:unset" title="unset"><code class="xref cmake cmake-command docutils literal"><span class="pre">unset()</span></code></a> commands explicitly
set or unset a variable, but other commands have semantics
that modify variables as well.
Variable names are case-sensitive and may consist of almost
any text, but we recommend sticking to names consisting only
of alphanumeric characters plus <code class="docutils literal"><span class="pre">_</span></code> and <code class="docutils literal"><span class="pre">-</span></code>.</p>
<p>Variables have dynamic scope. Each variable &#8220;set&#8221; or &#8220;unset&#8221;
creates a binding in the current scope:</p>
<dl class="docutils">
<dt>Function Scope</dt>
<dd><a class="reference internal" href="#command-definitions">Command Definitions</a> created by the <span class="target" id="index-1-command:function"></span><a class="reference internal" href="../command/function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal"><span class="pre">function()</span></code></a> command
create commands that, when invoked, process the recorded commands
in a new variable binding scope. A variable &#8220;set&#8221; or &#8220;unset&#8221;
binds in this scope and is visible for the current function and
any nested calls, but not after the function returns.</dd>
<dt>Directory Scope</dt>
<dd><p class="first">Each of the <a class="reference internal" href="#directories">Directories</a> in a source tree has its own variable
bindings. Before processing the <code class="docutils literal"><span class="pre">CMakeLists.txt</span></code> file for a
directory, CMake copies all variable bindings currently defined
in the parent directory, if any, to initialize the new directory
scope. CMake <a class="reference internal" href="#scripts">Scripts</a>, when processed with <code class="docutils literal"><span class="pre">cmake</span> <span class="pre">-P</span></code>, bind
variables in one &#8220;directory&#8221; scope.</p>
<p class="last">A variable &#8220;set&#8221; or &#8220;unset&#8221; not inside a function call binds
to the current directory scope.</p>
</dd>
<dt>Persistent Cache</dt>
<dd>CMake stores a separate set of &#8220;cache&#8221; variables, or &#8220;cache entries&#8221;,
whose values persist across multiple runs within a project build
tree. Cache entries have an isolated binding scope modified only
by explicit request, such as by the <code class="docutils literal"><span class="pre">CACHE</span></code> option of the
<span class="target" id="index-1-command:set"></span><a class="reference internal" href="../command/set.html#command:set" title="set"><code class="xref cmake cmake-command docutils literal"><span class="pre">set()</span></code></a> and <span class="target" id="index-1-command:unset"></span><a class="reference internal" href="../command/unset.html#command:unset" title="unset"><code class="xref cmake cmake-command docutils literal"><span class="pre">unset()</span></code></a> commands.</dd>
</dl>
<p>When evaluating <a class="reference internal" href="#variable-references">Variable References</a>, CMake first searches the
function call stack, if any, for a binding and then falls back
to the binding in the current directory scope, if any. If a
&#8220;set&#8221; binding is found, its value is used. If an &#8220;unset&#8221; binding
is found, or no binding is found, CMake then searches for a
cache entry. If a cache entry is found, its value is used.
Otherwise, the variable reference evaluates to an empty string.</p>
<p>The <span class="target" id="index-0-manual:cmake-variables(7)"></span><a class="reference internal" href="cmake-variables.7.html#manual:cmake-variables(7)" title="cmake-variables(7)"><code class="xref cmake cmake-manual docutils literal"><span class="pre">cmake-variables(7)</span></code></a> manual documents many variables
that are provided by CMake or have meaning to CMake when set
by project code.</p>
</div>
<div class="section" id="lists">
<span id="cmake-language-lists"></span><h2><a class="toc-backref" href="#id32">Lists</a><a class="headerlink" href="#lists" title="Permalink to this headline"></a></h2>
<p>Although all values in CMake are stored as strings, a string
may be treated as a list in certain contexts, such as during
evaluation of an <a class="reference internal" href="#unquoted-argument">Unquoted Argument</a>. In such contexts, a string
is divided into list elements by splitting on <code class="docutils literal"><span class="pre">;</span></code> characters not
following an unequal number of <code class="docutils literal"><span class="pre">[</span></code> and <code class="docutils literal"><span class="pre">]</span></code> characters and not
immediately preceded by a <code class="docutils literal"><span class="pre">\</span></code>. The sequence <code class="docutils literal"><span class="pre">\;</span></code> does not
divide a value but is replaced by <code class="docutils literal"><span class="pre">;</span></code> in the resulting element.</p>
<p>A list of elements is represented as a string by concatenating
the elements separated by <code class="docutils literal"><span class="pre">;</span></code>. For example, the <span class="target" id="index-2-command:set"></span><a class="reference internal" href="../command/set.html#command:set" title="set"><code class="xref cmake cmake-command docutils literal"><span class="pre">set()</span></code></a>
command stores multiple values into the destination variable
as a list:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="s">srcs</span> <span class="s">a.c</span> <span class="s">b.c</span> <span class="s">c.c</span><span class="p">)</span> <span class="c"># sets &quot;srcs&quot; to &quot;a.c;b.c;c.c&quot;</span>
</pre></div>
</div>
<p>Lists are meant for simple use cases such as a list of source
files and should not be used for complex data processing tasks.
Most commands that construct lists do not escape <code class="docutils literal"><span class="pre">;</span></code> characters
in list elements, thus flattening nested lists:</p>
<div class="highlight-cmake"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="s">x</span> <span class="s">a</span> <span class="s2">&quot;b;c&quot;</span><span class="p">)</span> <span class="c"># sets &quot;x&quot; to &quot;a;b;c&quot;, not &quot;a;b\;c&quot;</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">cmake-language(7)</a><ul>
<li><a class="reference internal" href="#organization">Organization</a><ul>
<li><a class="reference internal" href="#directories">Directories</a></li>
<li><a class="reference internal" href="#scripts">Scripts</a></li>
<li><a class="reference internal" href="#modules">Modules</a></li>
</ul>
</li>
<li><a class="reference internal" href="#syntax">Syntax</a><ul>
<li><a class="reference internal" href="#encoding">Encoding</a></li>
<li><a class="reference internal" href="#source-files">Source Files</a></li>
<li><a class="reference internal" href="#command-invocations">Command Invocations</a></li>
<li><a class="reference internal" href="#command-arguments">Command Arguments</a><ul>
<li><a class="reference internal" href="#bracket-argument">Bracket Argument</a></li>
<li><a class="reference internal" href="#quoted-argument">Quoted Argument</a></li>
<li><a class="reference internal" href="#unquoted-argument">Unquoted Argument</a></li>
</ul>
</li>
<li><a class="reference internal" href="#escape-sequences">Escape Sequences</a></li>
<li><a class="reference internal" href="#variable-references">Variable References</a></li>
<li><a class="reference internal" href="#comments">Comments</a><ul>
<li><a class="reference internal" href="#bracket-comment">Bracket Comment</a></li>
<li><a class="reference internal" href="#line-comment">Line Comment</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#control-structures">Control Structures</a><ul>
<li><a class="reference internal" href="#conditional-blocks">Conditional Blocks</a></li>
<li><a class="reference internal" href="#loops">Loops</a></li>
<li><a class="reference internal" href="#command-definitions">Command Definitions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#variables">Variables</a></li>
<li><a class="reference internal" href="#lists">Lists</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../generator/Sublime Text 2.html"
title="previous chapter">Sublime Text 2</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="cmake-server.7.html"
title="next chapter">cmake-server(7)</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/manual/cmake-language.7.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#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-server.7.html" title="cmake-server(7)"
>next</a> |</li>
<li class="right" >
<a href="../generator/Sublime Text 2.html" title="Sublime Text 2"
>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.8.2 Documentation</a> &#187;
</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2000-2017 Kitware, Inc. and Contributors.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.2.
</div>
</body>
</html>