blob: ff0a5453571735a956b0b6ee83366557e858be3b [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_C_KNOWN_FEATURES &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_CUDA_KNOWN_FEATURES" href="CMAKE_CUDA_KNOWN_FEATURES.html" />
<link rel="prev" title="AUTOUIC_SOURCE_GROUP" href="AUTOUIC_SOURCE_GROUP.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_CUDA_KNOWN_FEATURES.html" title="CMAKE_CUDA_KNOWN_FEATURES"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="AUTOUIC_SOURCE_GROUP.html" title="AUTOUIC_SOURCE_GROUP"
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-properties.7.html" accesskey="U">cmake-properties(7)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">CMAKE_C_KNOWN_FEATURES</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="cmake-c-known-features">
<span id="prop_gbl:CMAKE_C_KNOWN_FEATURES"></span><h1>CMAKE_C_KNOWN_FEATURES<a class="headerlink" href="#cmake-c-known-features" title="Permalink to this headline"></a></h1>
<div class="versionadded">
<p><span class="versionmodified added">New in version 3.1.</span></p>
</div>
<p>List of C features known to this version of CMake.</p>
<p>The features listed in this global property may be known to be available to the
C compiler. If the feature is available with the C compiler, it will
be listed in the <span class="target" id="index-0-variable:CMAKE_C_COMPILE_FEATURES"></span><a class="reference internal" href="../variable/CMAKE_C_COMPILE_FEATURES.html#variable:CMAKE_C_COMPILE_FEATURES" title="CMAKE_C_COMPILE_FEATURES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_C_COMPILE_FEATURES</span></code></a> variable.</p>
<p>The features listed here may be used with the <span class="target" id="index-0-command:target_compile_features"></span><a class="reference internal" href="../command/target_compile_features.html#command:target_compile_features" title="target_compile_features"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_compile_features()</span></code></a>
command. See the <span class="target" id="index-0-manual:cmake-compile-features(7)"></span><a class="reference internal" href="../manual/cmake-compile-features.7.html#manual:cmake-compile-features(7)" title="cmake-compile-features(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-compile-features(7)</span></code></a> manual for information on
compile features and a list of supported compilers.</p>
<p>The features known to this version of CMake are listed below.</p>
<div class="section" id="high-level-meta-features-indicating-c-standard-support">
<h2>High level meta features indicating C standard support<a class="headerlink" href="#high-level-meta-features-indicating-c-standard-support" title="Permalink to this headline"></a></h2>
<div class="versionadded">
<p><span class="versionmodified added">New in version 3.8.</span></p>
</div>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">c_std_90</span></code></dt><dd><p>Compiler mode is at least C 90.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">c_std_99</span></code></dt><dd><p>Compiler mode is at least C 99.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">c_std_11</span></code></dt><dd><p>Compiler mode is at least C 11.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">c_std_17</span></code></dt><dd><div class="versionadded">
<p><span class="versionmodified added">New in version 3.21.</span></p>
</div>
<p>Compiler mode is at least C 17.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">c_std_23</span></code></dt><dd><div class="versionadded">
<p><span class="versionmodified added">New in version 3.21.</span></p>
</div>
<p>Compiler mode is at least C 23.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If the compiler's default standard level is at least that
of the requested feature, CMake may omit the <code class="docutils literal notranslate"><span class="pre">-std=</span></code> flag.
The flag may still be added if the compiler's default extensions mode
does not match the <span class="target" id="index-0-prop_tgt:&lt;LANG&gt;_EXTENSIONS"></span><a class="reference internal" href="../prop_tgt/LANG_EXTENSIONS.html#prop_tgt:&lt;LANG&gt;_EXTENSIONS" title="&lt;LANG&gt;_EXTENSIONS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_EXTENSIONS</span></code></a> target property,
or if the <span class="target" id="index-0-prop_tgt:&lt;LANG&gt;_STANDARD"></span><a class="reference internal" href="../prop_tgt/LANG_STANDARD.html#prop_tgt:&lt;LANG&gt;_STANDARD" title="&lt;LANG&gt;_STANDARD"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_STANDARD</span></code></a> target property is set.</p>
</div>
</div>
<div class="section" id="low-level-individual-compile-features">
<h2>Low level individual compile features<a class="headerlink" href="#low-level-individual-compile-features" title="Permalink to this headline"></a></h2>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">c_function_prototypes</span></code></dt><dd><p>Function prototypes, as defined in <code class="docutils literal notranslate"><span class="pre">ISO/IEC</span> <span class="pre">9899:1990</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">c_restrict</span></code></dt><dd><p><code class="docutils literal notranslate"><span class="pre">restrict</span></code> keyword, as defined in <code class="docutils literal notranslate"><span class="pre">ISO/IEC</span> <span class="pre">9899:1999</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">c_static_assert</span></code></dt><dd><p>Static assert, as defined in <code class="docutils literal notranslate"><span class="pre">ISO/IEC</span> <span class="pre">9899:2011</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">c_variadic_macros</span></code></dt><dd><p>Variadic macros, as defined in <code class="docutils literal notranslate"><span class="pre">ISO/IEC</span> <span class="pre">9899:1999</span></code>.</p>
</dd>
</dl>
</div>
</div>
<div class="clearer"></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_C_KNOWN_FEATURES</a><ul>
<li><a class="reference internal" href="#high-level-meta-features-indicating-c-standard-support">High level meta features indicating C standard support</a></li>
<li><a class="reference internal" href="#low-level-individual-compile-features">Low level individual compile features</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="AUTOUIC_SOURCE_GROUP.html"
title="previous chapter">AUTOUIC_SOURCE_GROUP</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="CMAKE_CUDA_KNOWN_FEATURES.html"
title="next chapter">CMAKE_CUDA_KNOWN_FEATURES</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/prop_gbl/CMAKE_C_KNOWN_FEATURES.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_CUDA_KNOWN_FEATURES.html" title="CMAKE_CUDA_KNOWN_FEATURES"
>next</a> |</li>
<li class="right" >
<a href="AUTOUIC_SOURCE_GROUP.html" title="AUTOUIC_SOURCE_GROUP"
>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-properties.7.html" >cmake-properties(7)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">CMAKE_C_KNOWN_FEATURES</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>