summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-12-28 22:15:41 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-07-18 09:53:46 (GMT)
commita74dad3bd3e5e4bbf09764a0b6bdedfe842442a7 (patch)
tree4aff5150f21f38f36c0c4d99243949f5b11602e5 /Source/cmMakefile.h
parentd26e6cb1c2f352da12200727a887e940aac463a7 (diff)
downloadCMake-a74dad3bd3e5e4bbf09764a0b6bdedfe842442a7.zip
CMake-a74dad3bd3e5e4bbf09764a0b6bdedfe842442a7.tar.gz
CMake-a74dad3bd3e5e4bbf09764a0b6bdedfe842442a7.tar.bz2
cmMakefile: decouple FinalAction from cmCommand
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 1b4ead7..166a697 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>
@@ -30,7 +31,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);