summaryrefslogtreecommitdiffstats
path: root/Source/cmAddTestCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-15 18:31:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-15 18:32:00 (GMT)
commitf11b8342a0cae42b42e47428e34577f266fd314c (patch)
treeae97522de60007aa532924a689fb06182b2fb55d /Source/cmAddTestCommand.cxx
parente125d50ddf7fc1a0df77fb0de7ca97db00277ee2 (diff)
parent328f586be7744350fbb5162dbb39eba255e68a6e (diff)
downloadCMake-f11b8342a0cae42b42e47428e34577f266fd314c.zip
CMake-f11b8342a0cae42b42e47428e34577f266fd314c.tar.gz
CMake-f11b8342a0cae42b42e47428e34577f266fd314c.tar.bz2
Merge topic 'modernize-memory-management'
328f586be7 cmAlgorithms.h: remove obsolete helpers f466cea3c9 cmMakefile: modernize memory management Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4215
Diffstat (limited to 'Source/cmAddTestCommand.cxx')
-rw-r--r--Source/cmAddTestCommand.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx
index 8942113..205c1c7 100644
--- a/Source/cmAddTestCommand.cxx
+++ b/Source/cmAddTestCommand.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmAddTestCommand.h"
+#include <cm/memory>
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
@@ -44,7 +46,7 @@ bool cmAddTestCommand(std::vector<std::string> const& args,
} else {
test = mf.CreateTest(args[0]);
test->SetOldStyle(true);
- mf.AddTestGenerator(new cmTestGenerator(test));
+ mf.AddTestGenerator(cm::make_unique<cmTestGenerator>(test));
}
test->SetCommand(command);
@@ -141,7 +143,7 @@ bool cmAddTestCommandHandleNameMode(std::vector<std::string> const& args,
test->SetProperty("WORKING_DIRECTORY", working_directory.c_str());
}
test->SetCommandExpandLists(command_expand_lists);
- mf.AddTestGenerator(new cmTestGenerator(test, configurations));
+ mf.AddTestGenerator(cm::make_unique<cmTestGenerator>(test, configurations));
return true;
}