| <!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_VERSION — 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_VS_DEVENV_COMMAND" href="CMAKE_VS_DEVENV_COMMAND.html" /> |
| <link rel="prev" title="CMAKE_VERBOSE_MAKEFILE" href="CMAKE_VERBOSE_MAKEFILE.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_VS_DEVENV_COMMAND.html" title="CMAKE_VS_DEVENV_COMMAND" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="CMAKE_VERBOSE_MAKEFILE.html" title="CMAKE_VERBOSE_MAKEFILE" |
| 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> » |
| </li> |
| <li> |
| <a href="../index.html">3.8.2 Documentation</a> » |
| </li> |
| |
| <li class="nav-item nav-item-1"><a href="../manual/cmake-variables.7.html" accesskey="U">cmake-variables(7)</a> »</li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <div class="section" id="cmake-version"> |
| <span id="variable:CMAKE_VERSION"></span><h1>CMAKE_VERSION<a class="headerlink" href="#cmake-version" title="Permalink to this headline">ΒΆ</a></h1> |
| <p>The CMake version string as three non-negative integer components |
| separated by <code class="docutils literal"><span class="pre">.</span></code> and possibly followed by <code class="docutils literal"><span class="pre">-</span></code> and other information. |
| The first two components represent the feature level and the third |
| component represents either a bug-fix level or development date.</p> |
| <p>Release versions and release candidate versions of CMake use the format:</p> |
| <div class="highlight-default"><div class="highlight"><pre><span></span><span class="o"><</span><span class="n">major</span><span class="o">>.<</span><span class="n">minor</span><span class="o">>.<</span><span class="n">patch</span><span class="o">></span><span class="p">[</span><span class="o">-</span><span class="n">rc</span><span class="o"><</span><span class="n">n</span><span class="o">></span><span class="p">]</span> |
| </pre></div> |
| </div> |
| <p>where the <code class="docutils literal"><span class="pre"><patch></span></code> component is less than <code class="docutils literal"><span class="pre">20000000</span></code>. Development |
| versions of CMake use the format:</p> |
| <div class="highlight-default"><div class="highlight"><pre><span></span><span class="o"><</span><span class="n">major</span><span class="o">>.<</span><span class="n">minor</span><span class="o">>.<</span><span class="n">date</span><span class="o">></span><span class="p">[</span><span class="o">-<</span><span class="nb">id</span><span class="o">></span><span class="p">]</span> |
| </pre></div> |
| </div> |
| <p>where the <code class="docutils literal"><span class="pre"><date></span></code> component is of format <code class="docutils literal"><span class="pre">CCYYMMDD</span></code> and <code class="docutils literal"><span class="pre"><id></span></code> |
| may contain arbitrary text. This represents development as of a |
| particular date following the <code class="docutils literal"><span class="pre"><major>.<minor></span></code> feature release.</p> |
| <p>Individual component values are also available in variables:</p> |
| <ul class="simple"> |
| <li><span class="target" id="index-0-variable:CMAKE_MAJOR_VERSION"></span><a class="reference internal" href="CMAKE_MAJOR_VERSION.html#variable:CMAKE_MAJOR_VERSION" title="CMAKE_MAJOR_VERSION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_MAJOR_VERSION</span></code></a></li> |
| <li><span class="target" id="index-0-variable:CMAKE_MINOR_VERSION"></span><a class="reference internal" href="CMAKE_MINOR_VERSION.html#variable:CMAKE_MINOR_VERSION" title="CMAKE_MINOR_VERSION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_MINOR_VERSION</span></code></a></li> |
| <li><span class="target" id="index-0-variable:CMAKE_PATCH_VERSION"></span><a class="reference internal" href="CMAKE_PATCH_VERSION.html#variable:CMAKE_PATCH_VERSION" title="CMAKE_PATCH_VERSION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_PATCH_VERSION</span></code></a></li> |
| <li><span class="target" id="index-0-variable:CMAKE_TWEAK_VERSION"></span><a class="reference internal" href="CMAKE_TWEAK_VERSION.html#variable:CMAKE_TWEAK_VERSION" title="CMAKE_TWEAK_VERSION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_TWEAK_VERSION</span></code></a></li> |
| </ul> |
| <p>Use 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 <code class="docutils literal"><span class="pre">VERSION_LESS</span></code>, <code class="docutils literal"><span class="pre">VERSION_GREATER</span></code>, |
| <code class="docutils literal"><span class="pre">VERSION_EQUAL</span></code>, <code class="docutils literal"><span class="pre">VERSION_LESS_EQUAL</span></code>, or <code class="docutils literal"><span class="pre">VERSION_GREATER_EQUAL</span></code> |
| operators to compare version string values against <code class="docutils literal"><span class="pre">CMAKE_VERSION</span></code> using a |
| component-wise test. Version component values may be 10 or larger so do not |
| attempt to compare version strings as floating-point numbers.</p> |
| <div class="admonition note"> |
| <p class="first admonition-title">Note</p> |
| <p>CMake versions 2.8.2 through 2.8.12 used three components for the |
| feature level. Release versions represented the bug-fix level in a |
| fourth component, i.e. <code class="docutils literal"><span class="pre"><major>.<minor>.<patch>[.<tweak>][-rc<n>]</span></code>. |
| Development versions represented the development date in the fourth |
| component, i.e. <code class="docutils literal"><span class="pre"><major>.<minor>.<patch>.<date>[-<id>]</span></code>.</p> |
| <p>CMake versions prior to 2.8.2 used three components for the |
| feature level and had no bug-fix component. Release versions |
| used an even-valued second component, i.e. |
| <code class="docutils literal"><span class="pre"><major>.<even-minor>.<patch>[-rc<n>]</span></code>. Development versions |
| used an odd-valued second component with the development date as |
| the third component, i.e. <code class="docutils literal"><span class="pre"><major>.<odd-minor>.<date></span></code>.</p> |
| <p class="last">The <code class="docutils literal"><span class="pre">CMAKE_VERSION</span></code> variable is defined by CMake 2.6.3 and higher. |
| Earlier versions defined only the individual component variables.</p> |
| </div> |
| </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_VERBOSE_MAKEFILE.html" |
| title="previous chapter">CMAKE_VERBOSE_MAKEFILE</a></p> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="CMAKE_VS_DEVENV_COMMAND.html" |
| title="next chapter">CMAKE_VS_DEVENV_COMMAND</a></p> |
| <div role="note" aria-label="source link"> |
| <h3>This Page</h3> |
| <ul class="this-page-menu"> |
| <li><a href="../_sources/variable/CMAKE_VERSION.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_VS_DEVENV_COMMAND.html" title="CMAKE_VS_DEVENV_COMMAND" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="CMAKE_VERBOSE_MAKEFILE.html" title="CMAKE_VERBOSE_MAKEFILE" |
| >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> » |
| </li> |
| <li> |
| <a href="../index.html">3.8.2 Documentation</a> » |
| </li> |
| |
| <li class="nav-item nav-item-1"><a href="../manual/cmake-variables.7.html" >cmake-variables(7)</a> »</li> |
| </ul> |
| </div> |
| <div class="footer" role="contentinfo"> |
| © Copyright 2000-2017 Kitware, Inc. and Contributors. |
| Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.2. |
| </div> |
| </body> |
| </html> |