Thanks a lot Marcel.<br><br>Another should be :<br>- make a second GLOB expression gathering all libraries you do not need <br>- make a LIST( REMOVE_ITEM FIRST_GLOB_RESULT SECOND_BLOG_RESULT)<br>but I suspect your solution is much efficient...<br>
<br>One additionnal question : do you know how to trigger the GLOB command just before a link target handling.<br>Because in my case, the GLOB command is running at the beginning of the compilation process, regardless <br>
the fact that I need to link to some .so&#39;s that have not been built yet. <br>Is a custom target is a right way?<br><br>Thanks again,<br>Arnaud.<br><br><br><div class="gmail_quote">On Mon, Jul 13, 2009 at 10:58 AM, Marcel Loose <span dir="ltr">&lt;<a href="mailto:loose@astron.nl">loose@astron.nl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Arnaud,<br>
<br>
Your mixing globbing with regular expressions. AFAIK it is not possible<br>
to do this with one statement. I would just glob for all *.so files and<br>
then use string(REGEX REPLACE ...) to replace occurrences of &#39;^libA.*<br>
\.so&#39; with an empty string.<br>
<br>
Best regards,<br>
Marcel Loose.<br>
<div><div></div><div class="h5"><br>
On Mon, 2009-07-13 at 10:43 +0200, Arnaud Devalkeneer wrote:<br>
&gt; Hello everybody,<br>
&gt;<br>
&gt; I would like to know if there exists a way to find all files in a<br>
&gt; directory with a custom file extension (e.g. *.so) except files<br>
&gt; beginning by a<br>
&gt; custom string (here libA). For example I am using the line :<br>
&gt;<br>
&gt; FILE( GLOB RESULT path/[^libA]*.so )<br>
&gt;<br>
&gt; but the RESULT variable remains empty. Of cource I am sure of *.so<br>
&gt; files existance in the path.<br>
&gt;<br>
&gt; Has anybody already tried to glob files in a directory, excluding some<br>
&gt; file name patterns?<br>
&gt; Thank you in advance for your help.<br>
&gt;<br>
&gt; Enjoy Cmake,<br>
&gt; Arnaud.<br>
&gt;<br>
</div></div>&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 <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: <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>
<br>
</blockquote></div><br>