Thanks, I didn&#39;t even think of doing it like that :)<div><br></div><div>This works great. Thanks!<br clear="all"><div><br></div><div>---------</div>Robert Dailey<br>
<br><br><div class="gmail_quote">On Tue, Nov 1, 2011 at 3:46 PM, Fraser Hutchison <span dir="ltr">&lt;<a href="mailto:fraser.hutchison@googlemail.com">fraser.hutchison@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Robert,<br>
    <br>
    I think you need something like:<div class="im"><br>
    <br>
    if( NOT COPY_DONE )<br>
    <div>    ....... do work ........</div></div>
        set( COPY_DONE true CACHE BOOL &quot;This is my documentation&quot; FORCE
    )<br>
    endif()<br>
    <br>
    Cheers,<br>
    <br>
    Fraser.<div><div class="h5"><br>
    <br>
    <br>
    On 01/11/2011 18:37, Robert Dailey wrote:
    </div></div><blockquote type="cite"><div><div class="h5">There is a one-time operation I need CMake to perform
      the very first time a user generates. This operation involves
      copying several files from a remote server (third party libraries)
      and placing them in the binary dir.
      <div>
        <br>
      </div>
      <div>Right now I&#39;m attempting to do this via a cache variable:</div>
      <div><br>
      </div>
      <div>set( COPY_DONE false CACHE BOOL &quot;This is my documentation&quot; )</div>
      <div>if( NOT COPY_DONE )</div>
      <div>    ....... do work ........</div>
      <div>    set( COPY_DONE true )</div>
      <div>endif()</div>
      <div><br>
      </div>
      <div>I do not make this an INTERNAL cache variable because at any
        time the user should be able to set COPY_DONE to false manually
        and it should recopy everything, and then set it back to &#39;true&#39;.</div>
      <div><br>
      </div>
      <div>The code above does not work because I&#39;m not using set(
        COPY_DONE true ............ FORCE ). But I have to resupply the
        docstring if I do it this way.</div>
      <div><br>
      </div>
      <div>Am I going about this the wrong way? Can anyone recommend a
        different approach? If not, how can I do this without having to
        duplicate the doc string?<br clear="all">
        <div><br>
        </div>
        <div>---------</div>
        Robert Dailey<br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><span class="HOEnZb"><font color="#888888"><pre>--

Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
    </font></span></blockquote>
  </div>

</blockquote></div><br></div>