[CMake] Why SET() not support regular expression ?
Stuart Herring
cmake at stuartherring.com
Fri Jan 18 07:54:15 EST 2008
On Jan 18, 2008 11:43 PM, Yang, Y. <Y.Yang at tue.nl> wrote:
> For example, SET( MY_SRCS mydir/*.c)
>
> if CMake can do this, I don't have to modify the CMakeLists.txt every
> time when I add new files to mydir.
>
> That's not exactly a regular expression - it's a glob.
In any case, FILE(GLOB ...) is what you want. (as seen at
http://www.cmake.org/HTML/Documentation.html)
In this case FILE(GLOB MY_SRCS mydir/*.c)
Although, personally I prefer to explicitly add files, that way I know I
haven't inadvertently included something I didn't want.
Regards,
Stuart.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080118/528fe68d/attachment.html
More information about the CMake
mailing list