Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 737a0d2434bad0661da784e0f3e0ca66 > files > 256

extra-cmake-modules-5.57.0-1.mga7.noarch.rpm


<!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="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>ECMUninstallTarget &#8212; Extra CMake Modules 5.57.0 documentation</title>
    <link rel="stylesheet" href="../_static/ecm.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <link rel="shortcut icon" href="../_static/kde-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="ECMUseFindModules" href="ECMUseFindModules.html" />
    <link rel="prev" title="ECMSetupVersion" href="ECMSetupVersion.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="ECMUseFindModules.html" title="ECMUseFindModules"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="ECMSetupVersion.html" title="ECMSetupVersion"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">ECM 5.57 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../manual/ecm-modules.7.html" accesskey="U">ecm-modules(7)</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="ecmuninstalltarget">
<span id="module:ECMUninstallTarget"></span><h1>ECMUninstallTarget<a class="headerlink" href="#ecmuninstalltarget" title="Permalink to this headline">¶</a></h1>
<p>Add an <code class="docutils literal notranslate"><span class="pre">uninstall</span></code> target.</p>
<p>By including this module, an <code class="docutils literal notranslate"><span class="pre">uninstall</span></code> target will be added to your CMake
project. This will remove all files installed (or updated) by a previous
invocation of the <code class="docutils literal notranslate"><span class="pre">install</span></code> target. It will not remove files created or
modified by an <code class="docutils literal notranslate"><span class="pre">install(SCRIPT)</span></code> or <code class="docutils literal notranslate"><span class="pre">install(CODE)</span></code> command; you should
create a custom uninstallation target for these and use <code class="docutils literal notranslate"><span class="pre">add_dependency</span></code> to
make the <code class="docutils literal notranslate"><span class="pre">uninstall</span></code> target depend on it:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nb">include</span><span class="p">(</span><span class="s">ECMUninstallTarget</span><span class="p">)</span>
<span class="nb">install</span><span class="p">(</span><span class="s">SCRIPT</span> <span class="s">install-foo.cmake</span><span class="p">)</span>
<span class="nb">add_custom_target</span><span class="p">(</span><span class="s">uninstall_foo</span> <span class="s">COMMAND</span> <span class="o">${</span><span class="nv">CMAKE_COMMAND</span><span class="o">}</span> <span class="s">-P</span> <span class="s">uninstall-foo.cmake</span><span class="p">)</span>
<span class="nb">add_dependency</span><span class="p">(</span><span class="s">uninstall</span> <span class="s">uninstall_foo</span><span class="p">)</span>
</pre></div>
</div>
<p>The target will fail if the <code class="docutils literal notranslate"><span class="pre">install</span></code> target has not yet been run (so it is
not possible to run CMake on the project and then immediately run the
<code class="docutils literal notranslate"><span class="pre">uninstall</span></code> target).</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">CMake deliberately does not provide an <code class="docutils literal notranslate"><span class="pre">uninstall</span></code> target by default on
the basis that such a target has the potential to remove important files
from a user’s computer. Use with caution.</p>
</div>
<p>Since 1.7.0.</p>
</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="ECMSetupVersion.html"
                        title="previous chapter">ECMSetupVersion</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="ECMUseFindModules.html"
                        title="next chapter">ECMUseFindModules</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/module/ECMUninstallTarget.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</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="ECMUseFindModules.html" title="ECMUseFindModules"
             >next</a> |</li>
        <li class="right" >
          <a href="ECMSetupVersion.html" title="ECMSetupVersion"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">ECM 5.57 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../manual/ecm-modules.7.html" >ecm-modules(7)</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright KDE Developers.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
    </div>
  </body>
</html>