[cmake-developers] Automoc in cmake

Brad King brad.king at kitware.com
Thu Jun 9 08:33:37 EDT 2011


On 6/9/2011 4:12 AM, Alexander Neundorf wrote:
> AFAIK depending on generated files via the #include does not work/is not 
> reliable (that's why generated files need to be added to the target).

For the Makefile generators, each target builds in three steps:

(1) Generate all custom command outputs
(2) Run implicit dependency scanning (#include)
(3) Compile source files

This ensures that any generated sources are available in time to
be picked up as dependencies of the compilation step.  However, this
all depends on knowing at CMake time what custom command outputs
will be needed and adding them to the target so they show up in
step (1).

-Brad



More information about the cmake-developers mailing list