On Thu, Feb 10, 2011 at 2:50 AM, Robert Bielik <span dir="ltr">&lt;<a href="mailto:robert.bielik@xponaut.se">robert.bielik@xponaut.se</a>&gt;</span> wrote:<div>Michael Wild skrev 2011-02-09 16:48:<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
what about this:<br>
<br>
file(GLOB_RECURSE glob_results &quot;/some/pattern*&quot;)<br>
set(dirs)<br>
foreach(f IN LISTS glob_results)<br>
   get_filename_component(d &quot;${f}&quot; PATH)<br>
   list(APPEND dirs &quot;${d}&quot;)<br>
endforeach()<br>
list(REMOVE_DUPLICATES dirs)<br>
</blockquote>
<br></div>
Yeah, works fine but it seems to be a lot slower than using the nested file(GLOB...) macro approach, but I don&#39;t know why.<br></blockquote><div><br></div><div><br></div><div>Probably because there are thousands of files, but only tens of directories. Bang! 100x slower.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
/Rob<div><div></div><div class="h5"><br>
<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></div>