[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-523-g9870ed6

Brad King brad.king at kitware.com
Thu Feb 23 14:27:42 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  9870ed61b83cd7b822d47a955f0c0e2543d065a7 (commit)
       via  fe5b8275e69a3ffe2ce22c80ba0ea08936967323 (commit)
      from  cf660ade3f88a6364dc86a9616da9b9198216e25 (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=9870ed61b83cd7b822d47a955f0c0e2543d065a7
commit 9870ed61b83cd7b822d47a955f0c0e2543d065a7
Merge: cf660ad fe5b827
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Feb 23 14:27:41 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 23 14:27:41 2017 -0500

    Merge topic 'cache-xaml-resx-headers' into next
    
    fe5b8275 VS: Cache the list of xaml and resx headers


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe5b8275e69a3ffe2ce22c80ba0ea08936967323
commit fe5b8275e69a3ffe2ce22c80ba0ea08936967323
Author:     Dmitry Kochkin <dmitry.kochkin at here.com>
AuthorDate: Thu Feb 23 20:08:08 2017 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Feb 23 14:23:15 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 8512b99..dfb6a5e 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -711,12 +711,17 @@ 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 == ResxHeadersCache.end()) {
+    ResxData data;
+    IMPLEMENT_VISIT_IMPL(Resx, COMMA cmGeneratorTarget::ResxData)
+    this->ResxHeadersCache[config] = data.ExpectedResxHeaders;
+  } else {
+    headers = it->second;
+  }
 }
 
 void cmGeneratorTarget::GetResxSources(std::vector<cmSourceFile const*>& srcs,
@@ -748,9 +753,14 @@ 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 == XamlHeadersCache.end()) {
+    XamlData data;
+    IMPLEMENT_VISIT_IMPL(Xaml, COMMA cmGeneratorTarget::XamlData)
+    this->XamlHeadersCache[config] = data.ExpectedXamlHeaders;
+  } else {
+    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 |   24 +++++++++++++++++-------
 Source/cmGeneratorTarget.h   |    4 ++++
 2 files changed, 21 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list