[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1012-gf9a5119
Brad King
brad.king at kitware.com
Tue Dec 2 11:16:26 EST 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 f9a511901132f9adfec51c58097db0aaf26c2098 (commit)
via 48f78f5f9ed3a7e0717359720ecc157418f55155 (commit)
from afed2be65cc751881b1bd24ef998c0d9df35fe75 (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=f9a511901132f9adfec51c58097db0aaf26c2098
commit f9a511901132f9adfec51c58097db0aaf26c2098
Merge: afed2be 48f78f5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 2 11:16:24 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 2 11:16:24 2014 -0500
Merge topic 'xcode-target-search-perf' into next
48f78f5f Xcode: use a map to look up target pointers (#15201)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=48f78f5f9ed3a7e0717359720ecc157418f55155
commit 48f78f5f9ed3a7e0717359720ecc157418f55155
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Mon Dec 1 12:56:46 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 2 10:51:15 2014 -0500
Xcode: use a map to look up target pointers (#15201)
Use an efficient internal lookup to associate cmTarget and cmXCodeObject
instances.
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b9f64e2..d222288 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -557,6 +557,7 @@ void cmGlobalXCodeGenerator::ClearXCodeObjects()
}
this->XCodeObjects.clear();
this->XCodeObjectIDs.clear();
+ this->XCodeObjectMap.clear();
this->GroupMap.clear();
this->GroupNameMap.clear();
this->TargetGroup.clear();
@@ -2458,6 +2459,7 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
target->AddAttribute("name", this->CreateString(cmtarget.GetName()));
target->AddAttribute("productName",this->CreateString(cmtarget.GetName()));
target->SetTarget(&cmtarget);
+ this->XCodeObjectMap[&cmtarget] = target;
// Add source files without build rules for editing convenience.
if(cmtarget.GetType() == cmTarget::UTILITY)
@@ -2661,6 +2663,7 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
target->AddAttribute("productType", this->CreateString(productType));
}
target->SetTarget(&cmtarget);
+ this->XCodeObjectMap[&cmtarget] = target;
target->SetId(this->GetOrCreateId(
cmtarget.GetName(), target->GetId()).c_str());
return target;
@@ -2673,16 +2676,14 @@ cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget(cmTarget const* t)
{
return 0;
}
- for(std::vector<cmXCodeObject*>::iterator i = this->XCodeObjects.begin();
- i != this->XCodeObjects.end(); ++i)
+
+ std::map<cmTarget const*, cmXCodeObject*>::const_iterator const i =
+ this->XCodeObjectMap.find(t);
+ if (i == this->XCodeObjectMap.end())
{
- cmXCodeObject* o = *i;
- if(o->GetTarget() == t)
- {
- return o;
- }
+ return 0;
}
- return 0;
+ return i->second;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 9d7b784..d2bc9d1 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -241,6 +241,7 @@ private:
std::map<std::string, cmXCodeObject* > GroupNameMap;
std::map<std::string, cmXCodeObject* > TargetGroup;
std::map<std::string, cmXCodeObject* > FileRefs;
+ std::map<cmTarget const*, cmXCodeObject* > XCodeObjectMap;
std::vector<std::string> Architectures;
std::string GeneratorToolset;
};
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list