[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-3012-g234ee0d

Ben Boeckel ben.boeckel at kitware.com
Wed May 7 15:42:59 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  234ee0d30eb1c8ff56f8f10f296380788fb5c001 (commit)
       via  325599caa2974f30d35f9ad0dbe1fc0760290b3e (commit)
       via  ac4106c69abea254e6a887dd42997fcdaca3a001 (commit)
      from  2fb3919f6c8c4582d9ca641f9ccea486d1fa2fae (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=234ee0d30eb1c8ff56f8f10f296380788fb5c001
commit 234ee0d30eb1c8ff56f8f10f296380788fb5c001
Merge: 2fb3919 325599c
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed May 7 15:42:58 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 7 15:42:58 2014 -0400

    Merge topic 'dev/hashmap-for-targets' into next
    
    325599ca cmGlobalGenerator: Store targets in hash maps
    ac4106c6 cmMakefile: Use a hashmap for imported targets


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=325599caa2974f30d35f9ad0dbe1fc0760290b3e
commit 325599caa2974f30d35f9ad0dbe1fc0760290b3e
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 May 7 15:48:32 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();
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index e80df84..e6672a8 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -341,7 +341,7 @@ void cmGlobalVisualStudio8Generator::Generate()
   if(this->AddCheckTarget())
     {
     // All targets depend on the build-system check target.
-    for(std::map<std::string,cmTarget *>::const_iterator
+    for(TargetMap::const_iterator
           ti = this->TotalTargets.begin();
         ti != this->TotalTargets.end(); ++ti)
       {
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b3975b4..d44da37 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1219,7 +1219,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
 void cmGlobalXCodeGenerator::ForceLinkerLanguages()
 {
   // This makes sure all targets link using the proper language.
-  for(std::map<std::string, cmTarget*>::const_iterator
+  for(TargetMap::const_iterator
         ti = this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti)
     {
     this->ForceLinkerLanguage(*ti->second);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac4106c69abea254e6a887dd42997fcdaca3a001
commit ac4106c69abea254e6a887dd42997fcdaca3a001
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 May 7 15:48:32 2014 -0400

    cmMakefile: Use a hashmap for imported targets

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 07cfe12..556bc9b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3911,8 +3911,7 @@ cmTarget* cmMakefile::FindTarget(const std::string& name,
 {
   if (!excludeAliases)
     {
-    std::map<std::string, cmTarget*>::const_iterator i
-                                              = this->AliasTargets.find(name);
+    TargetMap::const_iterator i = this->AliasTargets.find(name);
     if (i != this->AliasTargets.end())
       {
       return i->second;
@@ -4134,7 +4133,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
+  TargetMap::const_iterator
     imported = this->ImportedTargets.find(name);
   if(imported != this->ImportedTargets.end())
     {
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3bccb63..b4ee3b8 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -909,7 +909,12 @@ protected:
 
   // libraries, classes, and executables
   mutable cmTargets Targets;
-  std::map<std::string, cmTarget*> AliasTargets;
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+  typedef cmsys::hash_map<std::string, cmTarget*> TargetMap;
+#else
+  typedef std::map<std::string, cmTarget*> TargetMap;
+#endif
+  TargetMap AliasTargets;
   cmGeneratorTargetsType GeneratorTargets;
   std::vector<cmSourceFile*> SourceFiles;
 
@@ -1010,7 +1015,7 @@ private:
   friend class cmMakefileCall;
 
   std::vector<cmTarget*> ImportedTargetsOwned;
-  std::map<std::string, cmTarget*> ImportedTargets;
+  TargetMap ImportedTargets;
 
   // Internal policy stack management.
   void PushPolicy(bool weak = false,

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list