summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-12-29 10:36:48 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2019-12-30 15:55:39 (GMT)
commit5444a8095da50cdf4306d33fe137baa7711f1781 (patch)
treec0ec64b08aa5fda9f7b8bb88f263ba5128a205da /Source/cmGlobalGenerator.h
parent15526d4b1072647179290fb5c2d0a3a5275415c7 (diff)
downloadCMake-5444a8095da50cdf4306d33fe137baa7711f1781.zip
CMake-5444a8095da50cdf4306d33fe137baa7711f1781.tar.gz
CMake-5444a8095da50cdf4306d33fe137baa7711f1781.tar.bz2
cmGlobalGenerator: modernize memrory managemenbt
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index f3078ac..3d11c61 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -162,11 +162,11 @@ public:
*/
virtual void Generate();
- virtual cmLinkLineComputer* CreateLinkLineComputer(
+ virtual std::unique_ptr<cmLinkLineComputer> CreateLinkLineComputer(
cmOutputConverter* outputConverter,
cmStateDirectory const& stateDir) const;
- cmLinkLineComputer* CreateMSVC60LinkLineComputer(
+ std::unique_ptr<cmLinkLineComputer> CreateMSVC60LinkLineComputer(
cmOutputConverter* outputConverter,
cmStateDirectory const& stateDir) const;
@@ -249,7 +249,7 @@ public:
cmake* GetCMakeInstance() const { return this->CMakeInstance; }
void SetConfiguredFilesPath(cmGlobalGenerator* gen);
- const std::vector<cmMakefile*>& GetMakefiles() const
+ const std::vector<std::unique_ptr<cmMakefile>>& GetMakefiles() const
{
return this->Makefiles;
}
@@ -268,7 +268,7 @@ public:
this->CurrentConfigureMakefile = mf;
}
- void AddMakefile(cmMakefile* mf);
+ void AddMakefile(std::unique_ptr<cmMakefile> mf);
//! Set an generator for an "external makefile based project"
void SetExternalMakefileProjectGenerator(
@@ -445,12 +445,13 @@ public:
void ProcessEvaluationFiles();
- std::map<std::string, cmExportBuildFileGenerator*>& GetBuildExportSets()
+ std::map<std::string, std::unique_ptr<cmExportBuildFileGenerator>>&
+ GetBuildExportSets()
{
return this->BuildExportSets;
}
- void AddBuildExportSet(cmExportBuildFileGenerator*);
- void AddBuildExportExportSet(cmExportBuildFileGenerator*);
+ void AddBuildExportSet(std::unique_ptr<cmExportBuildFileGenerator>);
+ void AddBuildExportExportSet(std::unique_ptr<cmExportBuildFileGenerator>);
bool IsExportedTargetsFile(const std::string& filename) const;
bool GenerateImportFile(const std::string& file);
cmExportBuildFileGenerator* GetExportedTargetsFile(
@@ -549,7 +550,7 @@ protected:
std::string FindMakeProgramFile;
std::string ConfiguredFilesPath;
cmake* CMakeInstance;
- std::vector<cmMakefile*> Makefiles;
+ std::vector<std::unique_ptr<cmMakefile>> Makefiles;
LocalGeneratorVector LocalGenerators;
cmMakefile* CurrentConfigureMakefile;
// map from project name to vector of local generators in that project
@@ -559,7 +560,8 @@ protected:
std::set<std::string> InstallComponents;
// Sets of named target exports
cmExportSetMap ExportSets;
- std::map<std::string, cmExportBuildFileGenerator*> BuildExportSets;
+ std::map<std::string, std::unique_ptr<cmExportBuildFileGenerator>>
+ BuildExportSets;
std::map<std::string, cmExportBuildFileGenerator*> BuildExportExportSets;
std::map<std::string, std::string> AliasTargets;