summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-07-12 10:15:21 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-07-17 12:58:27 (GMT)
commit3bed969dace917e5bf551c6783da425f5e2217c7 (patch)
treec5dc37940f62022d52518e2d73ecaf6d5cc5ceda /Source/CTest
parentfaacb90a13f87d32aaf3e5c45cfd48af7e84b733 (diff)
downloadCMake-3bed969dace917e5bf551c6783da425f5e2217c7.zip
CMake-3bed969dace917e5bf551c6783da425f5e2217c7.tar.gz
CMake-3bed969dace917e5bf551c6783da425f5e2217c7.tar.bz2
cmMakefile: Modernize AddFunctionBlocker method to accept a std::unique_ptr
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 861bd06..85040dd 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -4,13 +4,6 @@
#include "cmsys/Directory.hxx"
#include "cmsys/Process.h"
-#include <map>
-#include <ratio>
-#include <sstream>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <utility>
#include "cm_memory.hxx"
@@ -41,6 +34,15 @@
#include "cmSystemTools.h"
#include "cmake.h"
+#include <map>
+#include <memory>
+#include <ratio>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <utility>
+
#ifdef _WIN32
# include <windows.h>
#else
@@ -372,9 +374,11 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
#endif
// always add a function blocker to update the elapsed time
- cmCTestScriptFunctionBlocker* f = new cmCTestScriptFunctionBlocker();
- f->CTestScriptHandler = this;
- this->Makefile->AddFunctionBlocker(f);
+ {
+ auto fb = cm::make_unique<cmCTestScriptFunctionBlocker>();
+ fb->CTestScriptHandler = this;
+ this->Makefile->AddFunctionBlocker(std::move(fb));
+ }
/* Execute CTestScriptMode.cmake, which loads CMakeDetermineSystem and
CMakeSystemSpecificInformation, so