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.cxx | |
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.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8188ffa..f297fdf 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -353,6 +353,11 @@ private: cmMakefile* Makefile; }; +void cmMakefile::OnExecuteCommand(std::function<void()> callback) +{ + this->ExecuteCommandCallback = std::move(callback); +} + bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, cmExecutionStatus& status) { @@ -364,6 +369,10 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, return result; } + if (this->ExecuteCommandCallback) { + this->ExecuteCommandCallback(); + } + // Place this call on the call stack. cmMakefileCall stack_manager(this, lff, status); static_cast<void>(stack_manager); |