summaryrefslogtreecommitdiff
path: root/Source/cmGlobalUnixMakefileGenerator3.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-12-09 18:13:42 +0100
committerMarc Chevrier <marc.chevrier@gmail.com>2019-12-10 00:24:06 +0100
commit36c8cae2e8c23228d3292e77b9bfc65b009bb263 (patch)
treed2dae86bea8247398e6edef358a72cd661e588a7 /Source/cmGlobalUnixMakefileGenerator3.h
parent352999ac4647d6c5b0d81890df4531d677532843 (diff)
downloadcmake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.tar.gz
cmLocalGenerator: modernize memory management
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.h')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 79db30ebd6..5608baf375 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -8,6 +8,7 @@
#include <cstddef>
#include <iosfwd>
#include <map>
+#include <memory>
#include <set>
#include <string>
#include <vector>
@@ -89,7 +90,8 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
- cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) override;
+ std::unique_ptr<cmLocalGenerator> CreateLocalGenerator(
+ cmMakefile* mf) override;
/**
* Try to determine system information such as shared library
@@ -107,8 +109,9 @@ public:
*/
void Generate() override;
- void WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream,
- std::vector<cmLocalGenerator*>&);
+ void WriteMainCMakefileLanguageRules(
+ cmGeneratedFileStream& cmakefileStream,
+ std::vector<std::unique_ptr<cmLocalGenerator>>&);
// write out the help rule listing the valid targets
void WriteHelpRule(std::ostream& ruleFileStream,
@@ -161,7 +164,7 @@ protected:
void WriteMainCMakefile();
void WriteConvenienceRules2(std::ostream& ruleFileStream,
- cmLocalUnixMakefileGenerator3*);
+ cmLocalUnixMakefileGenerator3&);
void WriteDirectoryRule2(std::ostream& ruleFileStream,
DirectoryTarget const& dt, const char* pass,
@@ -227,7 +230,7 @@ protected:
size_t CountProgressMarksInTarget(
cmGeneratorTarget const* target,
std::set<cmGeneratorTarget const*>& emitted);
- size_t CountProgressMarksInAll(cmLocalGenerator* lg);
+ size_t CountProgressMarksInAll(const cmLocalGenerator& lg);
cmGeneratedFileStream* CommandDatabase;