[CMake] SOURCE_GROUP regular expressions file extensions

William A. Hoffman billlist at nycap.rr.com
Mon Apr 24 09:13:44 EDT 2006


You could use the FILES option of SOURCE_GROUP.

-Bill


At 05:04 AM 4/24/2006, Carlos Capdepon wrote:
>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" <<mailto:carlos.capdepon at gmail.com>carlos.capdepon at gmail.com> 
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list