| |
| <!DOCTYPE html> |
| |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| <title>GENERATED — 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="HEADER_FILE_ONLY" href="HEADER_FILE_ONLY.html" /> |
| <link rel="prev" title="Fortran_PREPROCESS" href="Fortran_PREPROCESS.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="HEADER_FILE_ONLY.html" title="HEADER_FILE_ONLY" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="Fortran_PREPROCESS.html" title="Fortran_PREPROCESS" |
| 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.23.1 Documentation</a> » |
| </li> |
| |
| <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" accesskey="U">cmake-properties(7)</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">GENERATED</a></li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <div class="section" id="generated"> |
| <span id="prop_sf:GENERATED"></span><h1>GENERATED<a class="headerlink" href="#generated" title="Permalink to this headline">ΒΆ</a></h1> |
| <p>Is this source file generated as part of the build or CMake process.</p> |
| <div class="versionchanged"> |
| <p><span class="versionmodified changed">Changed in version 3.20: </span>The GENERATED source file property is now visible in all directories.</p> |
| </div> |
| <p>Tells the internal CMake engine that a source file is generated by an outside |
| process such as another build step, or the execution of CMake itself. |
| This information is then used to exempt the file from any existence or |
| validity checks.</p> |
| <p>Any file that is</p> |
| <ul class="simple"> |
| <li><p>created by the execution of commands such as |
| <span class="target" id="index-0-command:add_custom_command"></span><a class="reference internal" href="../command/add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> and <span class="target" id="index-0-command:file"></span><a class="reference internal" href="../command/file.html#command:file" title="file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(GENERATE)</span></code></a></p></li> |
| <li><p>listed as one of the <code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code> of an <span class="target" id="index-1-command:add_custom_command"></span><a class="reference internal" href="../command/add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> |
| or <span class="target" id="index-0-command:add_custom_target"></span><a class="reference internal" href="../command/add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a> command, or</p></li> |
| <li><p>created by a CMake <code class="docutils literal notranslate"><span class="pre">AUTOGEN</span></code> operation such as <span class="target" id="index-0-prop_tgt:AUTOMOC"></span><a class="reference internal" href="../prop_tgt/AUTOMOC.html#prop_tgt:AUTOMOC" title="AUTOMOC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOMOC</span></code></a>, |
| <span class="target" id="index-0-prop_tgt:AUTORCC"></span><a class="reference internal" href="../prop_tgt/AUTORCC.html#prop_tgt:AUTORCC" title="AUTORCC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTORCC</span></code></a>, or <span class="target" id="index-0-prop_tgt:AUTOUIC"></span><a class="reference internal" href="../prop_tgt/AUTOUIC.html#prop_tgt:AUTOUIC" title="AUTOUIC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOUIC</span></code></a></p></li> |
| </ul> |
| <p>will be marked with the <code class="docutils literal notranslate"><span class="pre">GENERATED</span></code> property.</p> |
| <p>When a generated file created as the <code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code> of an |
| <span class="target" id="index-2-command:add_custom_command"></span><a class="reference internal" href="../command/add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> command is explicitly listed as a source file |
| for any target in the same directory scope (which usually means the same |
| <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file), CMake will automatically create a dependency to |
| make sure the file is generated before building that target.</p> |
| <p>The <a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a> will remove <code class="docutils literal notranslate"><span class="pre">GENERATED</span></code> files during |
| <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code>.</p> |
| <p>Generated sources may be hidden in some IDE tools, while in others they might |
| be shown. For the special case of sources generated by CMake's <span class="target" id="index-1-prop_tgt:AUTOMOC"></span><a class="reference internal" href="../prop_tgt/AUTOMOC.html#prop_tgt:AUTOMOC" title="AUTOMOC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOMOC</span></code></a>, |
| <span class="target" id="index-1-prop_tgt:AUTORCC"></span><a class="reference internal" href="../prop_tgt/AUTORCC.html#prop_tgt:AUTORCC" title="AUTORCC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTORCC</span></code></a> or <span class="target" id="index-1-prop_tgt:AUTOUIC"></span><a class="reference internal" href="../prop_tgt/AUTOUIC.html#prop_tgt:AUTOUIC" title="AUTOUIC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOUIC</span></code></a> functionality, the |
| <span class="target" id="index-0-prop_gbl:AUTOGEN_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTOGEN_SOURCE_GROUP.html#prop_gbl:AUTOGEN_SOURCE_GROUP" title="AUTOGEN_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTOGEN_SOURCE_GROUP</span></code></a>, <span class="target" id="index-0-prop_gbl:AUTOMOC_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTOMOC_SOURCE_GROUP.html#prop_gbl:AUTOMOC_SOURCE_GROUP" title="AUTOMOC_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTOMOC_SOURCE_GROUP</span></code></a>, |
| <span class="target" id="index-0-prop_gbl:AUTORCC_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTORCC_SOURCE_GROUP.html#prop_gbl:AUTORCC_SOURCE_GROUP" title="AUTORCC_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTORCC_SOURCE_GROUP</span></code></a> and <span class="target" id="index-0-prop_gbl:AUTOUIC_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTOUIC_SOURCE_GROUP.html#prop_gbl:AUTOUIC_SOURCE_GROUP" title="AUTOUIC_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTOUIC_SOURCE_GROUP</span></code></a> target |
| properties may influence where the generated sources are grouped in the project's |
| file lists.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>Starting with CMake 3.20 the <code class="docutils literal notranslate"><span class="pre">GENERATED</span></code> source file property can be set |
| and retrieved from any directory scope. It is an all-or-nothing property. |
| It also can no longer be removed or unset if it was set to <code class="docutils literal notranslate"><span class="pre">TRUE</span></code>. Policy |
| <span class="target" id="index-0-policy:CMP0118"></span><a class="reference internal" href="../policy/CMP0118.html#policy:CMP0118" title="CMP0118"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0118</span></code></a> was introduced to allow supporting the <code class="docutils literal notranslate"><span class="pre">OLD</span></code> behavior |
| for some time.</p> |
| </div> |
| </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="Fortran_PREPROCESS.html" |
| title="previous chapter">Fortran_PREPROCESS</a></p> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="HEADER_FILE_ONLY.html" |
| title="next chapter">HEADER_FILE_ONLY</a></p> |
| <div role="note" aria-label="source link"> |
| <h3>This Page</h3> |
| <ul class="this-page-menu"> |
| <li><a href="../_sources/prop_sf/GENERATED.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="HEADER_FILE_ONLY.html" title="HEADER_FILE_ONLY" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="Fortran_PREPROCESS.html" title="Fortran_PREPROCESS" |
| >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.23.1 Documentation</a> » |
| </li> |
| |
| <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" >cmake-properties(7)</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">GENERATED</a></li> |
| </ul> |
| </div> |
| |
| <div class="footer" role="contentinfo"> |
| © Copyright 2000-2022 Kitware, Inc. and Contributors. |
| Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2. |
| </div> |
| </body> |
| </html> |