[CMake] How to make FILE() append to the list of files?
Bill Hoffman
bill.hoffman at kitware.com
Wed Nov 26 20:27:11 EST 2008
Robert Dailey wrote:
> Hi,
>
> I have about 20 directories that contain source files. However, the
> FILE() call I make to each directory will have a different glob
> expression. I need to be able to do FILE( GLOB ..... ) about 20 times
> and each time have it append to the existing variable I give it. Is this
> possible? What would be the recommended way of accumulating a list of
> files in all 20 directories?
>
find . -name "*.c" > source_files.txt
edit source_files.txt and put that list of files exiplicitly into a
CMakeLists.txt file.
file(GLOB is a bad way to get source lists for CMake. CMake has no way
of knowing when new files have been put in the directory.
-Bill
More information about the CMake
mailing list