summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-17 15:10:08 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-17 15:11:06 (GMT)
commit14fb0f3967f625264768dc9005e0b3e9191bd6d7 (patch)
tree73a7e18e479aeeed6630f077a244c887d57073af /Source/cmMakefile.cxx
parente82e4b03418e13c7e9d7062d81ba6510fd66be9b (diff)
parent8c83f39a90b98a65a067813db1841ebcd6e0a400 (diff)
downloadCMake-14fb0f3967f625264768dc9005e0b3e9191bd6d7.zip
CMake-14fb0f3967f625264768dc9005e0b3e9191bd6d7.tar.gz
CMake-14fb0f3967f625264768dc9005e0b3e9191bd6d7.tar.bz2
Merge topic 'smart_ptr/cmSourceFile'
8c83f39a90 cmSourceFile: use unique_ptr for CustomCommand Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !3815
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 88d03f9..f35b999 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -15,6 +15,8 @@
#include <sstream>
#include <utility>
+#include "cm_memory.hxx"
+
#include "cmAlgorithms.h"
#include "cmCommandArgumentParserHelper.h"
#include "cmCustomCommand.h"
@@ -1026,7 +1028,7 @@ cmSourceFile* cmMakefile::AddCustomCommandToOutput(
depends2.push_back(main_dependency);
}
- cmCustomCommand* cc = new cmCustomCommand(
+ std::unique_ptr<cmCustomCommand> cc = cm::make_unique<cmCustomCommand>(
this, outputs, byproducts, depends2, commandLines, comment, workingDir);
cc->SetEscapeOldStyle(escapeOldStyle);
cc->SetEscapeAllowMakeVars(true);
@@ -1035,7 +1037,7 @@ cmSourceFile* cmMakefile::AddCustomCommandToOutput(
cc->SetCommandExpandLists(command_expand_lists);
cc->SetDepfile(depfile);
cc->SetJobPool(job_pool);
- file->SetCustomCommand(cc);
+ file->SetCustomCommand(std::move(cc));
this->UpdateOutputToSourceMap(outputs, file, false);
this->UpdateOutputToSourceMap(byproducts, file, true);
}