Yep, that sounds fine - just wanted to put the warning out there since it'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"><<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@gmail.com</a>></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'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'm running CMake using -P as a script<br>
processor, so there'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 <<a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a>> wrote:<br>
> And, just as a caution: Don't use file(GLOB to create a list of source files<br>
> to compile. Search the wiki or the archives for info.<br>
> Ryan<br>
><br>
> On Wed, Jan 12, 2011 at 12:05 PM, Andreas Pakulat <<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>> wrote:<br>
>><br>
>> On 12.01.11 11:56:53, kent williams wrote:<br>
>> > I'm generating a list of files with file(GLOB), but then I want to<br>
>> > remove some filenames from the resulting list.<br>
>> ><br>
>> > So essentially I'd like a CMake function like this<br>
>> ><br>
>> > function(RemoveItemsFromList ListA ListToRemove)<br>
>> > endfunction(RemoveItemsFromList)<br>
>> ><br>
>> > and I don't know what to put in the middle ;-)<br>
>><br>
>> There's no need for a function, the list() function can already do that:<br>
>><br>
>> list( REMOVE_ITEM yourlist ${listToRemove} )<br>
>><br>
>> Andreas<br>
>><br>
>> --<br>
>> Give thought to your reputation. Consider changing name and moving to<br>
>> a new town.<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<br>
>> <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:<br>
>> <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>
><br>
><br>
><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" target="_blank">http://academic.cleardefinition.com</a><br>
> Internal VRAC/HCI Site: <a href="http://tinyurl.com/rpavlik" target="_blank">http://tinyurl.com/rpavlik</a><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<br>
> <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:<br>
> <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>
><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>