summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-23 10:52:36 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-23 11:00:33 (GMT)
commit7b4b61a4d38e4c7fe3fe992a6263d8d1f0785858 (patch)
treef43eaa67777164ce5ba0dda2f381e35260d06b50 /Source/cmMakefile.h
parent22d58e07e5dc54e113ae7414dea604549b0cfc43 (diff)
downloadCMake-7b4b61a4d38e4c7fe3fe992a6263d8d1f0785858.zip
CMake-7b4b61a4d38e4c7fe3fe992a6263d8d1f0785858.tar.gz
CMake-7b4b61a4d38e4c7fe3fe992a6263d8d1f0785858.tar.bz2
cmMakefile: Define cmTargetMap type in cmMakefile instead of cmTarget
The `cmTargetMap` type is only used in the context of `cmMakefile`. Therefore it is the most appropriate place to declare it. This moves the `cmTarget.h/cmTargets` type definition to `cmMakefile::cmTargetMap`.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index be1ac5a..d223347 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -373,14 +373,13 @@ public:
return this->ComplainFileRegularExpression.c_str();
}
- /**
- * Get the list of targets
- */
- cmTargets& GetTargets() { return this->Targets; }
- /**
- * Get the list of targets, const version
- */
- const cmTargets& GetTargets() const { return this->Targets; }
+ // -- List of targets
+ typedef std::unordered_map<std::string, cmTarget> cmTargetMap;
+ /** Get the target map */
+ cmTargetMap& GetTargets() { return this->Targets; }
+ /** Get the target map - const version */
+ cmTargetMap const& GetTargets() const { return this->Targets; }
+
const std::vector<cmTarget*>& GetOwnedImportedTargets() const
{
return this->ImportedTargetsOwned;
@@ -896,7 +895,7 @@ protected:
mutable std::set<cmListFileContext> CMP0054ReportedIds;
// libraries, classes, and executables
- mutable cmTargets Targets;
+ mutable cmTargetMap Targets;
std::map<std::string, std::string> AliasTargets;
typedef std::vector<cmSourceFile*> SourceFileVec;