[CMake] SOURCE_GROUP regular expressions file extensions

Carlos Capdepon carlos.capdepon at gmail.com
Mon Apr 24 05:04:19 EDT 2006


I have this now in my CMakeLists.txt

SOURCE_GROUP("CMake Makefile" FILES CMakeLists.txt)
SOURCE_GROUP("Header Files" REGULAR_EXPRESSION .*\.h)
SOURCE_GROUP("Source Files" REGULAR_EXPRESSION .*\.cxx|.*\.cpp}
SOURCE_GROUP("Data Files" REGULAR_EXPRESSION .*/data/.*)
  ADD_EXECUTABLE(HelloWorld
    HelloWorld.cxx
 ../data/earth.jpg)

But it doesn't fits very well. :-(
I wish to select only files not contained in directories, and *.c files
capp.c
cxxapp.cxx
cppapp.cpp

but not:

/dir1/capp.c
/dir1/dir2/cxxapp.cxx
 ../cppapp.cpp
cnoapp.cxp
cnoapp.c.ext
cnoapp.cxx.rarefile.ext

I have tried other "regex" but I don't known if I am wrong or CMake not
supports ALL kind of regular expressions.

Thanks.
--
Un saludo,
"Carlos Capdepón" <carlos.capdepon at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060424/b1574e6d/attachment.html


More information about the CMake mailing list