summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestConfigureCommand.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-01-02 16:07:09 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-01-07 10:03:11 (GMT)
commita00960288bedb3cd9495222e7917c9a1092ce4c9 (patch)
tree03843ce4517050e051c1a225912841c5dabb8174 /Source/CTest/cmCTestConfigureCommand.cxx
parente353d8bd9bfd90396089e514d5b77f027ac27e99 (diff)
downloadCMake-a00960288bedb3cd9495222e7917c9a1092ce4c9.zip
CMake-a00960288bedb3cd9495222e7917c9a1092ce4c9.tar.gz
CMake-a00960288bedb3cd9495222e7917c9a1092ce4c9.tar.bz2
GlobalGenerator family: modernize memory management
Diffstat (limited to 'Source/CTest/cmCTestConfigureCommand.cxx')
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index f2f42b4..3854710 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -69,12 +69,11 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
bool multiConfig = false;
bool cmakeBuildTypeInOptions = false;
- cmGlobalGenerator* gg =
- this->Makefile->GetCMakeInstance()->CreateGlobalGenerator(
- cmakeGeneratorName);
+ auto gg = this->Makefile->GetCMakeInstance()->CreateGlobalGenerator(
+ cmakeGeneratorName);
if (gg) {
multiConfig = gg->IsMultiConfig();
- delete gg;
+ gg.reset();
}
std::string cmakeConfigureCommand =