[Cmake-commits] CMake branch, next, updated. v2.8.9-798-g71f127c

Peter Kuemmel syntheticpp at gmx.net
Thu Sep 27 07:08:18 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  71f127c9bbd934d67f9564edb86da4804429da8b (commit)
       via  2e7ffe0748746d15104720aae94200b72903f5cf (commit)
      from  ab91bf873b83a89d249326a68d3330002eba85ca (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=71f127c9bbd934d67f9564edb86da4804429da8b
commit 71f127c9bbd934d67f9564edb86da4804429da8b
Merge: ab91bf8 2e7ffe0
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Thu Sep 27 07:08:16 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Sep 27 07:08:16 2012 -0400

    Merge topic 'ninja-link-rsp-expand_2' into next
    
    2e7ffe0 Ninja: don't confuse ninja's rsp files with nmake's


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e7ffe0748746d15104720aae94200b72903f5cf
commit 2e7ffe0748746d15104720aae94200b72903f5cf
Author:     Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Wed Sep 26 10:07:25 2012 +0200
Commit:     Peter Kümmel <syntheticpp at gmx.net>
CommitDate: Thu Sep 27 12:48:11 2012 +0200

    Ninja: don't confuse ninja's rsp files with nmake's
    
    Move response files into CMakeFiles/ which makes them different to nmake's.

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 3f3cfbb..05f5b4c 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -106,6 +106,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
                                         const cmNinjaDeps& implicitDeps,
                                         const cmNinjaDeps& orderOnlyDeps,
                                         const cmNinjaVars& variables,
+                                        const std::string& rspfile,
                                         int cmdLineLimit)
 {
   // Make sure there is a rule.
@@ -181,12 +182,17 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
 
   // check if a response file rule should be used
   std::string buildstr = build.str();
-  const std::string assignments = variable_assignments.str();
+  std::string assignments = variable_assignments.str();
   const std::string args = arguments.str();
   if (cmdLineLimit > 0
       && args.size() + buildstr.size() + assignments.size()
-         > (size_t) cmdLineLimit)
-    buildstr += "_RSPFILE";
+                                                    > (size_t) cmdLineLimit) {
+    buildstr += "_RSP_FILE";
+    variable_assignments.clear();
+    cmGlobalNinjaGenerator::WriteVariable(variable_assignments,
+                                          "RSP_FILE", rspfile, "", 1);
+    assignments += variable_assignments.str();
+  }
 
   os << buildstr << args << assignments;
 }
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index b2fe243..24c3916 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -84,6 +84,7 @@ public:
                          const cmNinjaDeps& implicitDeps,
                          const cmNinjaDeps& orderOnlyDeps,
                          const cmNinjaVars& variables,
+                         const std::string& rspfile = std::string(),
                          int cmdLineLimit = -1);
 
   /**
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 6f991e2..a13e1f0 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -153,7 +153,7 @@ cmNinjaNormalTargetGenerator
   cmTarget::TargetType targetType = this->GetTarget()->GetType();
   std::string ruleName = this->LanguageLinkerRule();
   if (useResponseFile)
-    ruleName += "_RSPFILE";
+    ruleName += "_RSP_FILE";
 
   // Select whether to use a response file for objects.
   std::string rspfile;
@@ -179,7 +179,7 @@ cmNinjaNormalTargetGenerator
         } else {
           responseFlag = "@";
         }
-        rspfile = "$out.rsp";
+        rspfile = "$RSP_FILE";
         responseFlag += rspfile;
         rspcontent = "$in $LINK_LIBRARIES";
         vars.Objects = responseFlag.c_str();
@@ -549,6 +549,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
   int commandLineLengthLimit = -1;
 #endif
 
+  const std::string rspfile = std::string
+                              (cmake::GetCMakeFilesDirectoryPostSlash()) +
+                              this->GetTarget()->GetName() + ".rsp";
+
   // Write the build statement for this target.
   cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
                                      comment.str(),
@@ -558,6 +562,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
                                      implicitDeps,
                                      emptyDeps,
                                      vars,
+                                     rspfile,
                                      commandLineLengthLimit);
 
   if (targetOutput != targetOutputReal) {

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

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


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list