<div class="gmail_quote">On Mon, Jun 22, 2009 at 4:43 PM, James C. Sutherland <span dir="ltr"><<a href="mailto:James.Sutherland@utah.edu">James.Sutherland@utah.edu</a>></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;">
I am trying to add most files from a directory to a variable. I first<br>
glob the source files, and then want to remove the unwanted files from<br>
the resulting string. Here is what I have:<br>
<br>
set( empty "" )<br>
<br>
file( GLOB f90_src src/*.f90 )<br>
<br>
string( REPLACE<br>
${PROJECT_SOURCE_DIR}/src/ark_m.f90<br>
${empty}<br>
f90_src<br>
${f90_src}<br>
)<br>
<br>
message( STATUS ${f90_src} )<br>
<br>
The problem is that the file is not removed as you would expect. The<br>
message still outputs a string with both files in it...<br>
<br>
Is there a better way to achieve this?</blockquote><div><br>Try<br><br>list(REMOVE_ITEM <list> <value> [<value> ...])<br>
<br>
See <a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:list">http://www.cmake.org/cmake/help/cmake2.6docs.html#command:list</a> <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Thanks!<br>
<br>
James<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>
</blockquote></div><br><br clear="all"><br>-- <br>Adolfo Rodríguez Tsouroukdissian<br><br>Robotics engineer<br>PAL ROBOTICS S.L<br><a href="http://www.pal-robotics.com">http://www.pal-robotics.com</a><br>Tel. +34.93.414.53.47<br>
Fax.+34.93.209.11.09<br>