[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2733-g978901a
Ben Boeckel
ben.boeckel at kitware.com
Fri May 2 14:22:58 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 978901a9d20659eafa2dadbd0023efbbc7b9c953 (commit)
via 5de52931c6844ae2a6c4317badafaec999fe636b (commit)
via d16ae63650f047066b69966c7d1e502fe4f1601e (commit)
from b4e3166d3b2c82dddd3b6ecdd1b77909d554dfc6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=978901a9d20659eafa2dadbd0023efbbc7b9c953
commit 978901a9d20659eafa2dadbd0023efbbc7b9c953
Merge: b4e3166 5de5293
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri May 2 14:22:57 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 2 14:22:57 2014 -0400
Merge topic 'dev/hashmap-for-targets' into next
5de52931 cmGlobalGenerator: Store targets in hash maps
d16ae636 cmMakefile: Use a hashmap for imported targets
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5de52931c6844ae2a6c4317badafaec999fe636b
commit 5de52931c6844ae2a6c4317badafaec999fe636b
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Apr 30 15:40:39 2014 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Wed Apr 30 15:40:39 2014 -0400
cmGlobalGenerator: Store targets in hash maps
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index f09f7b3..4bdec3f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2070,15 +2070,13 @@ cmGlobalGenerator::FindTarget(const std::string& name,
{
if (!excludeAliases)
{
- std::map<std::string, cmTarget*>::const_iterator ai
- = this->AliasTargets.find(name);
+ TargetMap::const_iterator ai = this->AliasTargets.find(name);
if (ai != this->AliasTargets.end())
{
return ai->second;
}
}
- std::map<std::string,cmTarget *>::const_iterator i =
- this->TotalTargets.find ( name );
+ TargetMap::const_iterator i = this->TotalTargets.find ( name );
if ( i != this->TotalTargets.end() )
{
return i->second;
@@ -2859,7 +2857,7 @@ void cmGlobalGenerator::WriteSummary()
cmGeneratedFileStream fout(fname.c_str());
// Generate summary information files for each target.
- for(std::map<std::string,cmTarget *>::const_iterator ti =
+ for(TargetMap::const_iterator ti =
this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti)
{
if ((ti->second)->GetType() == cmTarget::INTERFACE_LIBRARY)
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 82fb1e5..14ec99a 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -22,6 +22,10 @@
#include "cmGeneratorTarget.h"
#include "cmGeneratorExpression.h"
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+# include <cmsys/hash_map.hxx>
+#endif
+
class cmake;
class cmGeneratorTarget;
class cmGeneratorExpressionEvaluationFile;
@@ -389,9 +393,14 @@ protected:
cmTargetManifest TargetManifest;
// All targets in the entire project.
- std::map<std::string,cmTarget *> TotalTargets;
- std::map<std::string,cmTarget *> AliasTargets;
- std::map<std::string,cmTarget *> ImportedTargets;
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+ typedef cmsys::hash_map<std::string, cmTarget*> TargetMap;
+#else
+ typedef std::map<std::string,cmTarget *> TargetMap;
+#endif
+ TargetMap TotalTargets;
+ TargetMap AliasTargets;
+ TargetMap ImportedTargets;
std::vector<cmGeneratorExpressionEvaluationFile*> EvaluationFiles;
virtual const char* GetPredefinedTargetsFolder();
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d16ae63650f047066b69966c7d1e502fe4f1601e
commit d16ae63650f047066b69966c7d1e502fe4f1601e
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Apr 30 13:27:33 2014 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Wed Apr 30 13:27:33 2014 -0400
cmMakefile: Use a hashmap for imported targets
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 07cfe12..ad2a555 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4134,7 +4134,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name,
{
// Look for an imported target. These take priority because they
// are more local in scope and do not have to be globally unique.
- std::map<std::string, cmTarget*>::const_iterator
+ ImportedTargetMap::const_iterator
imported = this->ImportedTargets.find(name);
if(imported != this->ImportedTargets.end())
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3bccb63..50d8e27 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -1010,7 +1010,12 @@ private:
friend class cmMakefileCall;
std::vector<cmTarget*> ImportedTargetsOwned;
- std::map<std::string, cmTarget*> ImportedTargets;
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+ typedef cmsys::hash_map<std::string, cmTarget*> ImportedTargetMap;
+#else
+ typedef std::map<std::string, cmTarget*> ImportedTargetMap;
+#endif
+ ImportedTargetMap ImportedTargets;
// Internal policy stack management.
void PushPolicy(bool weak = false,
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalGenerator.cxx | 8 +++-----
Source/cmGlobalGenerator.h | 15 ++++++++++++---
Source/cmMakefile.cxx | 2 +-
Source/cmMakefile.h | 7 ++++++-
4 files changed, 22 insertions(+), 10 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list