[CMake] 'AUTOMOC' feature skips sources of executable targets?

Alexander Neundorf a.neundorf-work at gmx.net
Tue Apr 30 12:20:01 EDT 2013


On Tuesday 30 April 2013, Haroogan wrote:
..
>  2. What's the point of recommending against it? Either one adds sources
>     by hand or one does it with GLOB - one has to rerun CMake anyway.

No, this is not necessary. CMake is rerun automatically whenever necessary.
By adding a file to a CMakeLists.txt, cmake detects that one of its input 
files changed, and so regenerates the build files.
So by adding the file, you automatically trigger everything what's necessary.
Usually adding the files is only a significant piece of work when setting up 
the buildsystem, after that usually only very few files (typically 1 or 2) are 
added at once, so I don't see this as a real problem.


Alex




More information about the CMake mailing list