[CMake] Feature Request: FILE (GLOB files "*.c" EXCEPT main.c test.c)

Alexandru Ciobanu aciobanu at matrox.com
Tue Aug 14 10:01:27 EDT 2007


Hi, Alex!

What I understood from you message is that:
    set ( src a1.c a2.c )
    add_executable ( cool ${src} )
*will* detect when a3.c is added. While, the following:
    FILE ( GLOB src *.c )
    add_executable ( cool ${src} )
*will not* detect the when a3.c is added.

Could you please elaborate on that?

Alex Ciobanu


Alexander Neundorf wrote:
> On Tuesday 14 August 2007 07:48, Martin Lutken wrote:
>   
> You shouldn't do this to get the list of source files.
> If you list the files in the cmake file, then cmake will notice if a file has 
> been added or removed and rerun.
> If you are using GLOB, the cmake files are not modified and so cmake doesn't 
> rerun if some file has been added or removed, this is especially inconvenient 
> if you update your sources from a version control system where you don't 
> know/care whether some file somewhere has been added or removed.
>
> Bye
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>   



More information about the CMake mailing list