[Cmake] Set a variable to a list of filenames that match a pa ttern

Bill Hoffman bill . hoffman at kitware . com
Thu, 31 Jul 2003 14:38:36 -0400


This one would be a problem because generated files will not be there when
cmake is run.  As a general rule or good style CMakeLists.txt file, I would
recommend not using the GLOB feature to build source lists. The problem is
that CMake will need to be re-run by hand each time a new file is added to the
source directory.  CMake will have no other way of know about new files. So
this is quite different than makes %.c rules that are reevaluated each time
make is run.  If the source files are explicit, then the only way to add new
ones is to modify the CMakeLists.txt file, which will cause cmake to automatically
re-run.  That will not happen with the GLOB command.

-Bill

At 02:20 PM 7/31/2003, Bitter, Ingmar (NIH/CC/DRD) wrote:

>*.cxx is for automatically generated code from the Qt moc preprocessor