diff options
author | Brad King <brad.king@kitware.com> | 2019-10-07 15:12:58 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-07 15:22:12 -0400 |
commit | f1fb63b306ad06a8931ca5a00a2b9ce9e66bc12e (patch) | |
tree | d2da200fd32bb7913ebc24de9672acf890bad907 /Source/cmGlobalGenerator.cxx | |
parent | ead89868ba09bb331ae31c116f1cec4a44713b3b (diff) | |
download | cmake-f1fb63b306ad06a8931ca5a00a2b9ce9e66bc12e.tar.gz |
file(GENERATE): Create output file structures even earlier
Since commit b80557c7bd (file(GENERATE): Evaluate early to allow
generating source files, 2014-11-04, v3.2.0-rc1~398^2) 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 commit 83c1657ff7 (Unity build: Generate
sources during Compute step, 2019-10-03) to support `file(GENERATE)`
outputs as sources in a target with `UNITY_BUILD` enabled.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ee9ea3c3b9..f0152c25d2 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1556,6 +1556,7 @@ bool cmGlobalGenerator::QtAutoGen() bool cmGlobalGenerator::AddAutomaticSources() { for (cmLocalGenerator* lg : this->LocalGenerators) { + lg->CreateEvaluationFileOutputs(); for (cmGeneratorTarget* gt : lg->GetGeneratorTargets()) { if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; @@ -3095,14 +3096,6 @@ cmGlobalGenerator::GetFilenameTargetDepends(cmSourceFile* sf) const return this->FilenameTargetDepends[sf]; } -void cmGlobalGenerator::CreateEvaluationSourceFiles( - std::string const& config) const -{ - for (cmLocalGenerator* localGen : this->LocalGenerators) { - localGen->CreateEvaluationFileOutputs(config); - } -} - void cmGlobalGenerator::ProcessEvaluationFiles() { std::vector<std::string> generatedFiles; |