Yep, that sounds fine - just wanted to put the warning out there since it&#39;s a common issue.<div><br></div><div>Ryan<br><br><div class="gmail_quote">On Thu, Jan 13, 2011 at 9:30 AM, kent williams <span dir="ltr">&lt;<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@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;">The particular reason I use file(GLOB is that I want to find instances<br>
of, for example tclsh -- tclsh tclsh8.5, tclsh8.4 -- whatever it<br>
happens to be named -- so I can remove it from the directory into<br>
which it&#39;s built.<br>
<br>
The main reason as near as I can figure NOT to use file(GLOB to build<br>
lists of source files is that you have to re-run cmake to pick up any<br>
files added or deleted, right?<br>
<br>
In my particular case, I&#39;m running CMake using -P as a script<br>
processor, so there&#39;s no problem with the cache getting out of sync.<br>
<div><div></div><div class="h5"><br>
On Thu, Jan 13, 2011 at 7:59 AM, Ryan Pavlik &lt;<a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a>&gt; wrote:<br>
&gt; And, just as a caution: Don&#39;t use file(GLOB to create a list of source files<br>
&gt; to compile.  Search the wiki or the archives for info.<br>
&gt; Ryan<br>
&gt;<br>
&gt; On Wed, Jan 12, 2011 at 12:05 PM, Andreas Pakulat &lt;<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 12.01.11 11:56:53, kent williams wrote:<br>
&gt;&gt; &gt; I&#39;m generating a list of files with file(GLOB), but then I want to<br>
&gt;&gt; &gt; remove some filenames from the resulting list.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; So essentially I&#39;d like a CMake function like this<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; function(RemoveItemsFromList ListA ListToRemove)<br>
&gt;&gt; &gt; endfunction(RemoveItemsFromList)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; and I don&#39;t know what to put in the middle ;-)<br>
&gt;&gt;<br>
&gt;&gt; There&#39;s no need for a function, the list() function can already do that:<br>
&gt;&gt;<br>
&gt;&gt; list( REMOVE_ITEM yourlist ${listToRemove} )<br>
&gt;&gt;<br>
&gt;&gt; Andreas<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Give thought to your reputation.  Consider changing name and moving to<br>
&gt;&gt; a new town.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt;&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Ryan Pavlik<br>
&gt; HCI Graduate Student<br>
&gt; Virtual Reality Applications Center<br>
&gt; Iowa State University<br>
&gt;<br>
&gt; <a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a><br>
&gt; <a href="http://academic.cleardefinition.com" target="_blank">http://academic.cleardefinition.com</a><br>
&gt; Internal VRAC/HCI Site: <a href="http://tinyurl.com/rpavlik" target="_blank">http://tinyurl.com/rpavlik</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ryan Pavlik<br>HCI Graduate Student<br>Virtual Reality Applications Center<br>Iowa State University<br><br><a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a><br>
<a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a><br>Internal VRAC/HCI Site: <a href="http://tinyurl.com/rpavlik">http://tinyurl.com/rpavlik</a><br>
</div>