[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-596-geedc69b
Brad King
brad.king at kitware.com
Mon Feb 27 09:26:13 EST 2017
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 eedc69b8a1f119f40fa48d7ed950974ea7140fd4 (commit)
via 73a6d4566a9fa13ffaef2f1111be808a220ba867 (commit)
from af064e58c0fdde06bb4f1c93d4c9e7acd94efc07 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eedc69b8a1f119f40fa48d7ed950974ea7140fd4
commit eedc69b8a1f119f40fa48d7ed950974ea7140fd4
Merge: af064e5 73a6d45
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 27 09:26:13 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 27 09:26:13 2017 -0500
Merge topic 'cache-xaml-resx-headers' into next
73a6d456 VS: Cache the list of xaml and resx headers
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73a6d4566a9fa13ffaef2f1111be808a220ba867
commit 73a6d4566a9fa13ffaef2f1111be808a220ba867
Author: Dmitry Kochkin <dmitry.kochkin at here.com>
AuthorDate: Sat Feb 25 22:56:13 2017 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 27 09:22:08 2017 -0500
VS: Cache the list of xaml and resx headers
Speed up VS project generation with many such headers.
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5815210..47d685d 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -711,12 +711,18 @@ void cmGeneratorTarget::GetExternalObjects(
IMPLEMENT_VISIT(ExternalObjects);
}
-void cmGeneratorTarget::GetExpectedResxHeaders(std::set<std::string>& srcs,
+void cmGeneratorTarget::GetExpectedResxHeaders(std::set<std::string>& headers,
const std::string& config) const
{
- ResxData data;
- IMPLEMENT_VISIT_IMPL(Resx, COMMA cmGeneratorTarget::ResxData)
- srcs = data.ExpectedResxHeaders;
+ HeadersCacheType::const_iterator it = this->ResxHeadersCache.find(config);
+ if (it == this->ResxHeadersCache.end()) {
+ ResxData data;
+ IMPLEMENT_VISIT_IMPL(Resx, COMMA cmGeneratorTarget::ResxData)
+ it = this->ResxHeadersCache
+ .insert(std::make_pair(config, data.ExpectedResxHeaders))
+ .first;
+ }
+ headers = it->second;
}
void cmGeneratorTarget::GetResxSources(std::vector<cmSourceFile const*>& srcs,
@@ -748,9 +754,15 @@ void cmGeneratorTarget::GetCertificates(std::vector<cmSourceFile const*>& data,
void cmGeneratorTarget::GetExpectedXamlHeaders(std::set<std::string>& headers,
const std::string& config) const
{
- XamlData data;
- IMPLEMENT_VISIT_IMPL(Xaml, COMMA cmGeneratorTarget::XamlData)
- headers = data.ExpectedXamlHeaders;
+ HeadersCacheType::const_iterator it = this->XamlHeadersCache.find(config);
+ if (it == this->XamlHeadersCache.end()) {
+ XamlData data;
+ IMPLEMENT_VISIT_IMPL(Xaml, COMMA cmGeneratorTarget::XamlData)
+ it = this->XamlHeadersCache
+ .insert(std::make_pair(config, data.ExpectedXamlHeaders))
+ .first;
+ }
+ headers = it->second;
}
void cmGeneratorTarget::GetExpectedXamlSources(std::set<std::string>& srcs,
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 689fbda..e72e0a6 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -739,6 +739,10 @@ private:
bool ComputePDBOutputDir(const std::string& kind, const std::string& config,
std::string& out) const;
+ typedef std::map<std::string, std::set<std::string> > HeadersCacheType;
+ mutable HeadersCacheType ResxHeadersCache;
+ mutable HeadersCacheType XamlHeadersCache;
+
public:
const std::vector<const cmGeneratorTarget*>& GetLinkImplementationClosure(
const std::string& config) const;
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorTarget.cxx | 26 +++++++++++++++++++-------
Source/cmGeneratorTarget.h | 4 ++++
2 files changed, 23 insertions(+), 7 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list