summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2021-12-12 06:01:20 (GMT)
committerBrad King <brad.king@kitware.com>2021-12-14 15:48:43 (GMT)
commit780341f360773d7b3b766b835bd539f46397e0a6 (patch)
tree767cdbaa73a9b9c7c38a31ab962034f1386d918f /Source/cmQtAutoGenInitializer.cxx
parenta6fa3fa136c291c36aefbc79b62995a63bf9107b (diff)
downloadCMake-780341f360773d7b3b766b835bd539f46397e0a6.zip
CMake-780341f360773d7b3b766b835bd539f46397e0a6.tar.gz
CMake-780341f360773d7b3b766b835bd539f46397e0a6.tar.bz2
cmCustomCommand: Track main dependency explicitly
Store the main dependency as the first entry in the dependency list plus a boolean member indicating its existence. Note that this slightly changes existing behavior: the main dependency was previously the last entry of the dependency list.
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r--Source/cmQtAutoGenInitializer.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index c2a37fe..a01e6ae 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1230,7 +1230,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
// Add a rule file to cause the target to build if a dependency has
// changed, which will trigger the pre-build command to run autogen
- std::string no_main_dependency;
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetOutputs(timestampFileGenex);
cc->SetDepends(uicDependencies);
@@ -1239,8 +1238,7 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(stdPipesUTF8);
- this->LocalGen->AddCustomCommandToOutput(no_main_dependency,
- std::move(cc));
+ this->LocalGen->AddCustomCommandToOutput(std::move(cc));
}
// Add the pre-build command directly to bypass the OBJECT_LIBRARY
@@ -1362,7 +1360,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
{ cmSystemTools::GetCMakeCommand(), "-E", "touch", outputFile }));
this->AddGeneratedSource(outputFile, this->Moc);
- const std::string no_main_dependency;
cc = cm::make_unique<cmCustomCommand>();
cc->SetOutputs(outputFile);
cc->SetByproducts(timestampByproducts);
@@ -1374,8 +1371,7 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetEscapeOldStyle(false);
cc->SetDepfile(this->AutogenTarget.DepFile);
cc->SetStdPipesUTF8(stdPipesUTF8);
- this->LocalGen->AddCustomCommandToOutput(no_main_dependency,
- std::move(cc));
+ this->LocalGen->AddCustomCommandToOutput(std::move(cc));
// Alter variables for the autogen target which now merely wraps the
// custom command
@@ -1524,12 +1520,10 @@ bool cmQtAutoGenInitializer::InitRccTargets()
if (!this->Rcc.ExecutableTargetName.empty()) {
ccDepends.push_back(this->Rcc.ExecutableTargetName);
}
- std::string no_main_dependency;
cc->SetOutputs(ccOutput);
cc->SetByproducts(ccByproducts);
cc->SetDepends(ccDepends);
- this->LocalGen->AddCustomCommandToOutput(no_main_dependency,
- std::move(cc));
+ this->LocalGen->AddCustomCommandToOutput(std::move(cc));
}
// Reconfigure when .qrc file changes
this->Makefile->AddCMakeDependFile(qrc.QrcFile);