Skip to content

file(GENERATE): Create output file structures even earlier

Brad King requested to merge brad.king/cmake:file-GENERATE-earlier into master

Since commit b80557c7 we create the cmSourceFile instances marked with a GENERATED source file property before tracing source dependencies. Move it to even earlier so that steps in cmGlobalGenerator::AddAutomaticSources can operate on all sources. This also avoids the accidental O(n^2) calls for n local generators that we had previously.

This is also needed since !3884 (merged) to support file(GENERATE) outputs as sources in a target with UNITY_BUILD enabled.

Merge request reports