[Cmake-commits] CMake branch, next, updated. v2.8.8-3353-g986f78a

Peter Kuemmel syntheticpp at gmx.net
Mon Jul 2 04:32:42 EDT 2012


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  986f78a1b24c441cb9c344852d8ee4857e48c15f (commit)
       via  6332ba5a58f0114d1763c263950eae20b09eaa4b (commit)
      from  98dd8b9c3c238043a96ae164136637df443b2db0 (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=986f78a1b24c441cb9c344852d8ee4857e48c15f
commit 986f78a1b24c441cb9c344852d8ee4857e48c15f
Merge: 98dd8b9 6332ba5
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Mon Jul 2 04:32:35 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 2 04:32:35 2012 -0400

    Merge topic 'ninja-cmdLineLimit' into next
    
    6332ba5 Ninja: also consider rule command length for rsp file


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6332ba5a58f0114d1763c263950eae20b09eaa4b
commit 6332ba5a58f0114d1763c263950eae20b09eaa4b
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Mon Jul 2 10:30:29 2012 +0200
Commit:     Peter Kuemmel <syntheticpp at gmx.net>
CommitDate: Mon Jul 2 10:30:29 2012 +0200

    Ninja: also consider rule command length for rsp file

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 6e8ce87..23f42e4 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -557,6 +557,8 @@ void cmGlobalNinjaGenerator::AddRule(const std::string& name,
                                     rspfile,
                                     restat,
                                     generator);
+
+  this->RuleCmdLength[name] = command.size();
 }
 
 bool cmGlobalNinjaGenerator::HasRule(const std::string &name)
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index e939f61..e5f8099 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -319,6 +319,8 @@ private:
 
   std::string ninjaCmd() const;
 
+  int GetRuleCmdLength(const std::string& name) { return RuleCmdLength[name]; }
+
 private:
   /// The file containing the build statement. (the relation ship of the
   /// compilation DAG).
@@ -335,6 +337,9 @@ private:
   /// The set of rules added to the generated build system.
   RulesSetType Rules;
 
+  /// Length of rule command, used by rsp file evaluation
+  std::map<std::string, int> RuleCmdLength;
+
   /// The set of dependencies to add to the "all" target.
   cmNinjaDeps AllDependencies;
 
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 01e8e73..6befb05 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -480,7 +480,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
 
   int cmdLineLimit;
 #ifdef _WIN32
-  cmdLineLimit = 8000;
+  cmdLineLimit = 8000 - this->GetGlobalGenerator()->
+                                 GetRuleCmdLength(this->LanguageLinkerRule());
 #else
   cmdLineLimit = -1; // TODO
 #endif

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

Summary of changes:
 Source/cmGlobalNinjaGenerator.cxx       |    2 ++
 Source/cmGlobalNinjaGenerator.h         |    5 +++++
 Source/cmNinjaNormalTargetGenerator.cxx |    3 ++-
 3 files changed, 9 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list