[CMake] Automatically listing source files with GLOB (Re: How to make FILE() append to the list of files?)

Bart Janssens bart.janssens at lid.kviv.be
Mon Dec 1 12:56:15 EST 2008


On Mon, Dec 1, 2008 at 4:50 PM,  <David.Karr at l-3com.com> wrote:
>>Yes but when he add a source file, he won't necessarily remember he
>>MUST rerun CMake manually [...]
>>
>>Whereas with hard-written sources files in CMakeLists.txt, the user
>>will get accustomed to "simple" CMakeList.txt editing [...]
>>
>>[...]

> Actually, when I was last faced with this task I decided the easier
> alternative for me was to cut and paste a lot of boring directory
> listings into my CMakeLists.txt files.  (This was in a much earlier
> version of CMake, and IIRC there was some problem with file globbing
> back then that was fixed soon afterward.)

Just thinking out loud here, but would it be possible for the trigger
that determines whether CMake should be rerun or not to check if any
files were added/removed? That would make the globbing method as
convenient as the manual editing.

Cheers,

-- 
Bart Janssens


More information about the CMake mailing list