Wow the property idea is perfect. I will use that instead. I tend to think too much in terms of either &quot;variable&quot; or &quot;cache variable&quot;, I tend to forget about properties.<div><br></div><div>Thanks!<br clear="all">
<div><br></div><div>---------</div>Robert Dailey<br>
<br><br><div class="gmail_quote">On Thu, Nov 10, 2011 at 8:22 AM, Michael Wild <span dir="ltr">&lt;<a href="mailto:themiwi@gmail.com">themiwi@gmail.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 class="HOEnZb"><div class="h5">On 11/10/2011 02:57 PM, Robert Dailey wrote:<br>
&gt; I have an internal cache variable and I want to append items to it in a<br>
&gt; FOR loop using FORCE. Can list( APPEND ) do this for me? If not, can<br>
&gt; someone show me an example of how this would be done? What are the<br>
&gt; performance implications of each solution?<br>
&gt;<br>
&gt; ---------<br>
&gt; Robert Dailey<br>
<br>
</div></div>AFAIK if the cache variable is INTERNAL, you don&#39;t need FORCE.<br>
list(APPEND) can&#39;t do this for you, but you can use a un-cached variable<br>
to assemble the list in the loop, and the set the INTERNAL cache<br>
variable after the loop finished.<br>
<br>
Also, if the values in that variable are not supposed to be persistent<br>
across multiple CMake runs, you might want to use a global property instead.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Michael<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
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><br>
<br>
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><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</font></span></blockquote></div><br></div>