Sindbad~EG File Manager

Current Path : /usr/local/doc/cmake/html/prop_tgt/
Upload File :
Current File : //usr/local/doc/cmake/html/prop_tgt/UNITY_BUILD_MODE.html

<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

  <title>UNITY_BUILD_MODE &mdash; CMake 3.26.5 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/_sphinx_javascript_frameworks_compat.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="UNITY_BUILD_UNIQUE_ID" href="UNITY_BUILD_UNIQUE_ID.html" />
    <link rel="prev" title="UNITY_BUILD_CODE_BEFORE_INCLUDE" href="UNITY_BUILD_CODE_BEFORE_INCLUDE.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="UNITY_BUILD_UNIQUE_ID.html" title="UNITY_BUILD_UNIQUE_ID"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="UNITY_BUILD_CODE_BEFORE_INCLUDE.html" title="UNITY_BUILD_CODE_BEFORE_INCLUDE"
             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.26.5 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="">UNITY_BUILD_MODE</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="unity-build-mode">
<span id="prop_tgt:UNITY_BUILD_MODE"></span><h1>UNITY_BUILD_MODE<a class="headerlink" href="#unity-build-mode" title="Permalink to this heading">ΒΆ</a></h1>
<div class="versionadded">
<p><span class="versionmodified added">New in version 3.18.</span></p>
</div>
<p>CMake provides different algorithms for selecting which sources are grouped
together into a <em>bucket</em>. Selection is decided by this property,
which has the following acceptable values:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">BATCH</span></code></dt><dd><p>When in this mode CMake determines which files are grouped together.
The <span class="target" id="index-0-prop_tgt:UNITY_BUILD_BATCH_SIZE"></span><a class="reference internal" href="UNITY_BUILD_BATCH_SIZE.html#prop_tgt:UNITY_BUILD_BATCH_SIZE" title="UNITY_BUILD_BATCH_SIZE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">UNITY_BUILD_BATCH_SIZE</span></code></a> property controls the upper limit on
how many sources can be combined per unity source file.</p>
<p>Example usage:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nb">example_library</span><span class="w"></span>
<span class="w">            </span><span class="nb">source1.cxx</span><span class="w"></span>
<span class="w">            </span><span class="nb">source2.cxx</span><span class="w"></span>
<span class="w">            </span><span class="nb">source3.cxx</span><span class="w"></span>
<span class="w">            </span><span class="nb">source4.cxx</span><span class="nf">)</span><span class="w"></span>

<span class="nf">set_target_properties(</span><span class="nb">example_library</span><span class="w"> </span><span class="no">PROPERTIES</span><span class="w"></span>
<span class="w">                      </span><span class="no">UNITY_BUILD_MODE</span><span class="w"> </span><span class="no">BATCH</span><span class="w"></span>
<span class="w">                      </span><span class="no">UNITY_BUILD_BATCH_SIZE</span><span class="w"> </span><span class="m">2</span><span class="w"></span>
<span class="w">                      </span><span class="nf">)</span><span class="w"></span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">GROUP</span></code></dt><dd><p>When in this mode each target explicitly specifies how to group
source files. Each source file that has the same
<span class="target" id="index-0-prop_sf:UNITY_GROUP"></span><a class="reference internal" href="../prop_sf/UNITY_GROUP.html#prop_sf:UNITY_GROUP" title="UNITY_GROUP"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">UNITY_GROUP</span></code></a> value will be grouped together. Any sources
that don't have this property will be compiled individually. The
<span class="target" id="index-1-prop_tgt:UNITY_BUILD_BATCH_SIZE"></span><a class="reference internal" href="UNITY_BUILD_BATCH_SIZE.html#prop_tgt:UNITY_BUILD_BATCH_SIZE" title="UNITY_BUILD_BATCH_SIZE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">UNITY_BUILD_BATCH_SIZE</span></code></a> property is ignored when using
this mode.</p>
<p>Example usage:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nb">example_library</span><span class="w"></span>
<span class="w">            </span><span class="nb">source1.cxx</span><span class="w"></span>
<span class="w">            </span><span class="nb">source2.cxx</span><span class="w"></span>
<span class="w">            </span><span class="nb">source3.cxx</span><span class="w"></span>
<span class="w">            </span><span class="nb">source4.cxx</span><span class="nf">)</span><span class="w"></span>

<span class="nf">set_target_properties(</span><span class="nb">example_library</span><span class="w"> </span><span class="no">PROPERTIES</span><span class="w"></span>
<span class="w">                      </span><span class="no">UNITY_BUILD_MODE</span><span class="w"> </span><span class="no">GROUP</span><span class="w"></span>
<span class="w">                      </span><span class="nf">)</span><span class="w"></span>

<span class="nf">set_source_files_properties(</span><span class="nb">source1.cxx</span><span class="w"> </span><span class="nb">source2.cxx</span><span class="w"> </span><span class="nb">source3.cxx</span><span class="w"></span>
<span class="w">                            </span><span class="no">PROPERTIES</span><span class="w"> </span><span class="no">UNITY_GROUP</span><span class="w"> </span><span class="s">&quot;bucket1&quot;</span><span class="w"></span>
<span class="w">                            </span><span class="nf">)</span><span class="w"></span>
<span class="nf">set_source_files_properties(</span><span class="nb">source4.cxx</span><span class="w"></span>
<span class="w">                            </span><span class="no">PROPERTIES</span><span class="w"> </span><span class="no">UNITY_GROUP</span><span class="w"> </span><span class="s">&quot;bucket2&quot;</span><span class="w"></span>
<span class="w">                            </span><span class="nf">)</span><span class="w"></span>
</pre></div>
</div>
</dd>
</dl>
<p>If no explicit <code class="docutils literal notranslate"><span class="pre">UNITY_BUILD_MODE</span></code> has been specified, CMake will
default to <code class="docutils literal notranslate"><span class="pre">BATCH</span></code>.</p>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="UNITY_BUILD_CODE_BEFORE_INCLUDE.html"
                          title="previous chapter">UNITY_BUILD_CODE_BEFORE_INCLUDE</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="UNITY_BUILD_UNIQUE_ID.html"
                          title="next chapter">UNITY_BUILD_UNIQUE_ID</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/prop_tgt/UNITY_BUILD_MODE.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>document.getElementById('searchbox').style.display = "block"</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="UNITY_BUILD_UNIQUE_ID.html" title="UNITY_BUILD_UNIQUE_ID"
             >next</a> |</li>
        <li class="right" >
          <a href="UNITY_BUILD_CODE_BEFORE_INCLUDE.html" title="UNITY_BUILD_CODE_BEFORE_INCLUDE"
             >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.26.5 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="">UNITY_BUILD_MODE</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
        &#169; Copyright 2000-2023 Kitware, Inc. and Contributors.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.0.2.
    </div>
  </body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists