On Jan 18, 2008 11:43 PM, Yang, Y. <<a href="mailto:Y.Yang@tue.nl">Y.Yang@tue.nl</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For example, SET( MY_SRCS mydir/*.c)<br><br>if CMake can do this, I don't have to modify the CMakeLists.txt every<br>time when I add new files to mydir.<br><br></blockquote></div>That's not exactly a regular expression - it's a glob.
In any case, FILE(GLOB ...) is what you want. (as seen at <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a>)<br>
In this case FILE(GLOB MY_SRCS mydir/*.c)<br>
Although, personally I prefer to explicitly add files, that way I know I haven't inadvertently included something I didn't want.<br><br>Regards,<br>Stuart.<br>