diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-02 16:07:09 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-07 10:03:11 (GMT) |
commit | a00960288bedb3cd9495222e7917c9a1092ce4c9 (patch) | |
tree | 03843ce4517050e051c1a225912841c5dabb8174 /Source/CTest/cmCTestBuildAndTestHandler.cxx | |
parent | e353d8bd9bfd90396089e514d5b77f027ac27e99 (diff) | |
download | CMake-a00960288bedb3cd9495222e7917c9a1092ce4c9.zip CMake-a00960288bedb3cd9495222e7917c9a1092ce4c9.tar.gz CMake-a00960288bedb3cd9495222e7917c9a1092ce4c9.tar.bz2 |
GlobalGenerator family: modernize memory management
Diffstat (limited to 'Source/CTest/cmCTestBuildAndTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 2ad661c..5e29386 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -215,11 +215,11 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) if (this->BuildNoCMake) { // Make the generator available for the Build call below. - cmGlobalGenerator* gen = cm.CreateGlobalGenerator(this->BuildGenerator); - cm.SetGlobalGenerator(gen); + cm.SetGlobalGenerator(cm.CreateGlobalGenerator(this->BuildGenerator)); if (!this->BuildGeneratorPlatform.empty()) { - cmMakefile mf(gen, cm.GetCurrentSnapshot()); - if (!gen->SetGeneratorPlatform(this->BuildGeneratorPlatform, &mf)) { + cmMakefile mf(cm.GetGlobalGenerator(), cm.GetCurrentSnapshot()); + if (!cm.GetGlobalGenerator()->SetGeneratorPlatform( + this->BuildGeneratorPlatform, &mf)) { return 1; } } |