[Cmake-commits] CMake branch, next, updated. v3.0.0-4225-gc292fe9
Brad King
brad.king at kitware.com
Mon Jul 14 10:25:09 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 c292fe995df032426d27821514aae2f9b3e2edb7 (commit)
via 1ca0c0e94ac39c895d5896b0193cbc7b963ff087 (commit)
from 3219a6127fc6fbcaac53cbe224e7eb6681818471 (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=c292fe995df032426d27821514aae2f9b3e2edb7
commit c292fe995df032426d27821514aae2f9b3e2edb7
Merge: 3219a61 1ca0c0e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 14 10:25:08 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 14 10:25:08 2014 -0400
Merge topic 'refactor-link-internals' into next
1ca0c0e9 cmTarget: Refactor internal imported LinkInterface map
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ca0c0e94ac39c895d5896b0193cbc7b963ff087
commit 1ca0c0e94ac39c895d5896b0193cbc7b963ff087
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 14 10:21:24 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 10:21:46 2014 -0400
cmTarget: Refactor internal imported LinkInterface map
Create the map entry up front and store in it a boolean value indicating
whether the LinkInterface structure has been populated. This approach
leads to shorter code that is easier to follow too.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 826a44b..79be1db 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -135,7 +135,7 @@ public:
LinkInterfaceMapType LinkInterfaceUsageRequirementsOnlyMap;
bool PolicyWarnedCMP0022;
- typedef std::map<TargetConfigPair, cmTarget::LinkInterface>
+ typedef std::map<TargetConfigPair, OptionalLinkInterface>
ImportLinkInterfaceMapType;
ImportLinkInterfaceMapType ImportLinkInterfaceMap;
ImportLinkInterfaceMapType ImportLinkInterfaceUsageRequirementsOnlyMap;
@@ -5977,26 +5977,21 @@ cmTarget::GetImportLinkInterface(const std::string& config,
this->Internal->ImportLinkInterfaceUsageRequirementsOnlyMap :
this->Internal->ImportLinkInterfaceMap);
- cmTargetInternals::ImportLinkInterfaceMapType::iterator i = lim.find(key);
- if(i == lim.end())
+ cmTargetInternals::OptionalLinkInterface& iface = lim[key];
+ if(!iface.AllDone)
{
- LinkInterface iface;
+ iface.AllDone = true;
iface.Multiplicity = info->Multiplicity;
cmSystemTools::ExpandListArgument(info->Languages, iface.Languages);
this->ExpandLinkItems(info->LibrariesProp, info->Libraries, config,
headTarget, usage_requirements_only,
iface.Libraries);
- {
std::vector<std::string> deps;
cmSystemTools::ExpandListArgument(info->SharedDeps, deps);
this->LookupLinkItems(deps, iface.SharedDeps);
}
- cmTargetInternals::ImportLinkInterfaceMapType::value_type
- entry(key, iface);
- i = lim.insert(entry).first;
- }
- return &i->second;
+ return &iface;
}
//----------------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
Source/cmTarget.cxx | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list