|
@@ -7,6 +7,7 @@
|
|
|
|
|
|
|
|
#include "cmsys/RegularExpression.hxx"
|
|
#include "cmsys/RegularExpression.hxx"
|
|
|
#include <deque>
|
|
#include <deque>
|
|
|
|
|
+#include <functional>
|
|
|
#include <map>
|
|
#include <map>
|
|
|
#include <memory>
|
|
#include <memory>
|
|
|
#include <set>
|
|
#include <set>
|
|
@@ -30,7 +31,6 @@
|
|
|
# include "cmSourceGroup.h"
|
|
# include "cmSourceGroup.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
-class cmCommand;
|
|
|
|
|
class cmCompiledGeneratorExpression;
|
|
class cmCompiledGeneratorExpression;
|
|
|
class cmCustomCommandLines;
|
|
class cmCustomCommandLines;
|
|
|
class cmExecutionStatus;
|
|
class cmExecutionStatus;
|
|
@@ -125,6 +125,13 @@ public:
|
|
|
bool EnforceUniqueName(std::string const& name, std::string& msg,
|
|
bool EnforceUniqueName(std::string const& name, std::string& msg,
|
|
|
bool isCustom = false) const;
|
|
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
|
|
* Perform FinalPass, Library dependency analysis etc before output of the
|
|
|
* makefile.
|
|
* makefile.
|
|
@@ -132,7 +139,7 @@ public:
|
|
|
void ConfigureFinalPass();
|
|
void ConfigureFinalPass();
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * run the final pass on all commands.
|
|
|
|
|
|
|
+ * run all FinalActions.
|
|
|
*/
|
|
*/
|
|
|
void FinalPass();
|
|
void FinalPass();
|
|
|
|
|
|
|
@@ -937,7 +944,7 @@ protected:
|
|
|
size_t ObjectLibrariesSourceGroupIndex;
|
|
size_t ObjectLibrariesSourceGroupIndex;
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
- std::vector<std::unique_ptr<cmCommand>> FinalPassCommands;
|
|
|
|
|
|
|
+ std::vector<FinalAction> FinalActions;
|
|
|
cmGlobalGenerator* GlobalGenerator;
|
|
cmGlobalGenerator* GlobalGenerator;
|
|
|
bool IsFunctionBlocked(const cmListFileFunction& lff,
|
|
bool IsFunctionBlocked(const cmListFileFunction& lff,
|
|
|
cmExecutionStatus& status);
|
|
cmExecutionStatus& status);
|