<div class="gmail_quote">On Wed, Feb 9, 2011 at 9:15 AM, Robert Bielik <span dir="ltr"><<a href="mailto:robert.bielik@xponaut.se">robert.bielik@xponaut.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
David Cole skrev 2011-02-09 14:31:<div class="im"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Is there some way I can make file(GLOB_RECURSE... ) start at a directory of my choice (instead of the current CMakeLists.txt folder) ?<br>
<br>
<br>
file(GLOB_RECURSE .... "${dir}/*")<br>
</blockquote>
<br></div>
Yes, and that will return file names. Would be nice to have a directive CMAKE_DIRECTORIES_ONLY to only return globbed paths...</blockquote><div><br><br>You can iterate the returned list something like this to accumulate just directory names:<br>
<br>set(dirs "")<br>foreach(f ${glob_results})<br> if(IS_DIRECTORY "${f}")<br> set(dirs ${dirs} ${f})<br> endif()<br>endforeach()<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
None of the find_* commands do recursion...<br>
</blockquote>
<br></div>
...which then could be fed to find_*<div><div></div><div class="h5"><br>
<br>
/Rob<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>