summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJosef Angstenberger <code@jtxa.de>2020-09-10 00:18:55 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-10 20:13:01 (GMT)
commitaee2c512246ec225cd9a3b3ce1a81b4d6e9491cb (patch)
tree5cf5a3f2f262fb6bb7fe12730a352dd14f2084c0 /Source
parent06cb6a162872cdd45a51dfce718d63ecea8a2d03 (diff)
downloadCMake-aee2c512246ec225cd9a3b3ce1a81b4d6e9491cb.zip
CMake-aee2c512246ec225cd9a3b3ce1a81b4d6e9491cb.tar.gz
CMake-aee2c512246ec225cd9a3b3ce1a81b4d6e9491cb.tar.bz2
file(GENERATE): Create output file structures for all directories first
Since commit 36ded610af (PCH: Generate sources during Compute step, 2019-10-05, v3.16.0-rc1~2^2) the source file lookup is done earlier than before. Its parent commit f1fb63b306 (file(GENERATE): Create output file structures even earlier, 2019-10-07, v3.16.0-rc1~2^2~1) prepared for that. However, that commit did not account for generating and using files in separate subdirectories. Fix this by evaluating all generated files before adding automatic files. Fixes: #21144
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4dc4092..bf8f6cb 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1611,6 +1611,8 @@ bool cmGlobalGenerator::AddAutomaticSources()
{
for (const auto& lg : this->LocalGenerators) {
lg->CreateEvaluationFileOutputs();
+ }
+ for (const auto& lg : this->LocalGenerators) {
for (const auto& gt : lg->GetGeneratorTargets()) {
if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
gt->GetType() == cmStateEnums::UTILITY ||