summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-11-06 21:38:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-11-06 21:38:34 (GMT)
commit954bb6549b8ff4f3429372b0ed780029b50616c4 (patch)
tree3ea5de3721ee5bd62acf460af46942059726ab51 /Source/cmGeneratorTarget.h
parentce7408514c98d39612c7f1e1d85929c223f71068 (diff)
parent2a67ebf71b1b6086fcfdde04d77925038f81850c (diff)
downloadCMake-954bb6549b8ff4f3429372b0ed780029b50616c4.zip
CMake-954bb6549b8ff4f3429372b0ed780029b50616c4.tar.gz
CMake-954bb6549b8ff4f3429372b0ed780029b50616c4.tar.bz2
Merge topic 'modernize-memory-management'
2a67ebf71b cmGeneratorTarget: modernize memory management Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3997
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r--Source/cmGeneratorTarget.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 62b88c5..f70b969 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -7,6 +7,7 @@
#include <cstddef>
#include <map>
+#include <memory>
#include <set>
#include <string>
#include <unordered_map>
@@ -816,10 +817,10 @@ private:
mutable std::map<std::string, CompatibleInterfaces> CompatibleInterfacesMap;
using cmTargetLinkInformationMap =
- std::map<std::string, cmComputeLinkInformation*>;
+ std::map<std::string, std::unique_ptr<cmComputeLinkInformation>>;
mutable cmTargetLinkInformationMap LinkInformation;
- void CheckPropertyCompatibility(cmComputeLinkInformation* info,
+ void CheckPropertyCompatibility(cmComputeLinkInformation& info,
const std::string& config) const;
struct LinkImplClosure : public std::vector<cmGeneratorTarget const*>
@@ -882,14 +883,17 @@ private:
bool MaybeHaveInterfaceProperty(std::string const& prop,
cmGeneratorExpressionContext* context) const;
- std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
- std::vector<TargetPropertyEntry*> CompileOptionsEntries;
- std::vector<TargetPropertyEntry*> CompileFeaturesEntries;
- std::vector<TargetPropertyEntry*> CompileDefinitionsEntries;
- std::vector<TargetPropertyEntry*> LinkOptionsEntries;
- std::vector<TargetPropertyEntry*> LinkDirectoriesEntries;
- std::vector<TargetPropertyEntry*> PrecompileHeadersEntries;
- std::vector<TargetPropertyEntry*> SourceEntries;
+ using TargetPropertyEntryVector =
+ std::vector<std::unique_ptr<TargetPropertyEntry>>;
+
+ TargetPropertyEntryVector IncludeDirectoriesEntries;
+ TargetPropertyEntryVector CompileOptionsEntries;
+ TargetPropertyEntryVector CompileFeaturesEntries;
+ TargetPropertyEntryVector CompileDefinitionsEntries;
+ TargetPropertyEntryVector LinkOptionsEntries;
+ TargetPropertyEntryVector LinkDirectoriesEntries;
+ TargetPropertyEntryVector PrecompileHeadersEntries;
+ TargetPropertyEntryVector SourceEntries;
mutable std::set<std::string> LinkImplicitNullProperties;
mutable std::map<std::string, std::string> PchHeaders;
mutable std::map<std::string, std::string> PchSources;