diff options
author | Brad King <brad.king@kitware.com> | 2019-07-19 16:08:53 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-19 16:09:03 (GMT) |
commit | 573f1fc19b39f0aaea6c17c1c11c1f5bbde227d3 (patch) | |
tree | a8df3f1c544c72a3e4e488a4ed966bfbb8fe1a40 /Source/cmMakefile.h | |
parent | 123384da2e20cc840a5c207ca467f78fc1acb7a1 (diff) | |
parent | 732dd344b974d880402b0cb047de328eca1df666 (diff) | |
download | CMake-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.h')
-rw-r--r-- | Source/cmMakefile.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 924cf24..1eca18c 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -7,6 +7,7 @@ #include "cmsys/RegularExpression.hxx" #include <deque> +#include <functional> #include <map> #include <memory> #include <set> @@ -31,7 +32,6 @@ # include "cmSourceGroup.h" #endif -class cmCommand; class cmCompiledGeneratorExpression; class cmCustomCommandLines; class cmExecutionStatus; @@ -125,6 +125,13 @@ public: bool EnforceUniqueName(std::string const& name, std::string& msg, bool isCustom = false) const; + using FinalAction = std::function<void(cmMakefile&)>; + + /** + * Register an action that is executed during FinalPass + */ + void AddFinalAction(FinalAction action); + /** * Perform FinalPass, Library dependency analysis etc before output of the * makefile. @@ -132,7 +139,7 @@ public: void ConfigureFinalPass(); /** - * run the final pass on all commands. + * run all FinalActions. */ void FinalPass(); @@ -937,7 +944,7 @@ protected: size_t ObjectLibrariesSourceGroupIndex; #endif - std::vector<std::unique_ptr<cmCommand>> FinalPassCommands; + std::vector<FinalAction> FinalActions; cmGlobalGenerator* GlobalGenerator; bool IsFunctionBlocked(const cmListFileFunction& lff, cmExecutionStatus& status); |