summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-19 16:08:53 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-19 16:09:03 (GMT)
commit573f1fc19b39f0aaea6c17c1c11c1f5bbde227d3 (patch)
treea8df3f1c544c72a3e4e488a4ed966bfbb8fe1a40 /Source/cmMakefile.cxx
parent123384da2e20cc840a5c207ca467f78fc1acb7a1 (diff)
parent732dd344b974d880402b0cb047de328eca1df666 (diff)
downloadCMake-573f1fc19b39f0aaea6c17c1c11c1f5bbde227d3.zip
CMake-573f1fc19b39f0aaea6c17c1c11c1f5bbde227d3.tar.gz
CMake-573f1fc19b39f0aaea6c17c1c11c1f5bbde227d3.tar.bz2
Merge topic 'command-final-action'
732dd344b9 cmCommand: remove FinalPass from interface fbee46e262 cmVariableWatchCommand: Port away from FinalPass 360d415592 cmLoadCommandCommand: Port away from FinalPass 316e40baec cmInstallProgramsCommand: Port away from FinalPass 7bc88b9165 cmInstallFilesCommand: Port away from FinalPass 6a1a3763ee cmFLTKWrapUICommand: Port away from FinalPass 20169f0b8d cmExportLibraryDependenciesCommand: Port away from FinalPass a74dad3bd3 cmMakefile: decouple FinalAction from cmCommand ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3562
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 5ae3a29..1723c5a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -414,9 +414,6 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
if (this->GetCMakeInstance()->GetWorkingMode() != cmake::NORMAL_MODE) {
cmSystemTools::SetFatalErrorOccured();
}
- } else if (pcmd->HasFinalPass()) {
- // use the command
- this->FinalPassCommands.push_back(std::move(pcmd));
}
}
} else {
@@ -767,6 +764,11 @@ struct file_not_persistent
};
}
+void cmMakefile::AddFinalAction(FinalAction action)
+{
+ this->FinalActions.push_back(std::move(action));
+}
+
void cmMakefile::FinalPass()
{
// do all the variable expansions here
@@ -774,8 +776,8 @@ void cmMakefile::FinalPass()
// give all the commands a chance to do something
// after the file has been parsed before generation
- for (auto& command : this->FinalPassCommands) {
- command->FinalPass();
+ for (FinalAction& action : this->FinalActions) {
+ action(*this);
}
// go through all configured files and see which ones still exist.