diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-07-26 22:21:01 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-07-30 22:03:17 (GMT) |
commit | b51fba6298012c3b697c461486ce06c9e5c97c16 (patch) | |
tree | 4405865e55af49bde1930acb3ed0073aeca09fb6 /Source/cmMakefile.h | |
parent | c76500949d3fcf5ff83ac6e7f1d565f5d786c5f0 (diff) | |
download | CMake-b51fba6298012c3b697c461486ce06c9e5c97c16.zip CMake-b51fba6298012c3b697c461486ce06c9e5c97c16.tar.gz CMake-b51fba6298012c3b697c461486ce06c9e5c97c16.tar.bz2 |
cmMakefile: Add OnExecuteCommand callback
In cmCTestScriptHandler, port away from cmFunctionBlocker
and update the elapsed time with the new callback instead.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index dc196ac..941e335 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -628,6 +628,11 @@ public: void PrintCommandTrace(const cmListFileFunction& lff) const; /** + * Set a callback that is invoked whenever ExecuteCommand is called. + */ + void OnExecuteCommand(std::function<void()> callback); + + /** * Execute a single CMake command. Returns true if the command * succeeded or false if it failed. */ @@ -964,6 +969,7 @@ private: bool EnforceUniqueDir(const std::string& srcPath, const std::string& binPath) const; + std::function<void()> ExecuteCommandCallback; using FunctionBlockerPtr = std::unique_ptr<cmFunctionBlocker>; using FunctionBlockersType = std::stack<FunctionBlockerPtr, std::vector<FunctionBlockerPtr>>; |