[Cmake-commits] CMake branch, next, updated. v3.8.0-rc2-539-g7a329ac

Kitware Robot kwrobot at kitware.com
Tue Mar 21 11:25:01 EDT 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  7a329acab4fb6cad9900245d18120401546f6e25 (commit)
       via  feaea0658c9cbd4345f698a22452fe3a08a194a3 (commit)
      from  8e3c673adebb25f95ca63a55d7ebf2b87c1f3e83 (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=7a329acab4fb6cad9900245d18120401546f6e25
commit 7a329acab4fb6cad9900245d18120401546f6e25
Merge: 8e3c673 feaea06
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 21 15:16:33 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Mar 21 11:16:35 2017 -0400

    Stage topic 'cuda_no_ninja_response_support'
    
    Topic-id: 23138
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/596


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=feaea0658c9cbd4345f698a22452fe3a08a194a3
commit feaea0658c9cbd4345f698a22452fe3a08a194a3
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Mar 21 08:38:45 2017 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Mar 21 11:09:18 2017 -0400

    CUDA: Disable support for using response files.

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b172478..4fc664d 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -753,11 +753,10 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
 
   cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator();
 
-  int commandLineLengthLimit = -1;
-  if (!this->ForceResponseFile()) {
-    commandLineLengthLimit = calculateCommandLineLengthLimit(
-      globalGen.GetRuleCmdLength(this->LanguageLinkerDeviceRule()));
-  }
+  // Device linking currently doesn't support response files so
+  // do not check if the user has explicitly forced a response file.
+  int const commandLineLengthLimit = calculateCommandLineLengthLimit(
+    globalGen.GetRuleCmdLength(this->LanguageLinkerDeviceRule()));
 
   const std::string rspfile =
     std::string(cmake::GetCMakeFilesDirectoryPostSlash()) +
@@ -1048,8 +1047,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
   }
   cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator();
 
+  bool const lang_supports_response =
+    !(this->TargetLinkLanguage == "RC" || this->TargetLinkLanguage == "CUDA");
   int commandLineLengthLimit = -1;
-  if (!this->ForceResponseFile()) {
+  if (!lang_supports_response || !this->ForceResponseFile()) {
     commandLineLengthLimit = calculateCommandLineLengthLimit(
       globalGen.GetRuleCmdLength(this->LanguageLinkerRule()));
   }
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b1f26e4..c952026 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -405,7 +405,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
   std::string rspcontent;
   std::string responseFlag;
 
-  if (lang != "RC" && this->ForceResponseFile()) {
+  bool const lang_supports_response = !(lang == "RC" || lang == "CUDA");
+  if (lang_supports_response && this->ForceResponseFile()) {
     rspfile = "$RSP_FILE";
     responseFlag = "@" + rspfile;
     rspcontent = " $DEFINES $INCLUDES $FLAGS";
@@ -930,9 +931,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
 
   this->SetMsvcTargetPdbVariable(vars);
 
-  bool const isRC = (language == "RC");
+  bool const lang_supports_response =
+    !(language == "RC" || language == "CUDA");
   int const commandLineLengthLimit =
-    ((!isRC && this->ForceResponseFile())) ? -1 : 0;
+    ((lang_supports_response && this->ForceResponseFile())) ? -1 : 0;
   std::string const rspfile = objectFileName + ".rsp";
 
   this->GetGlobalGenerator()->WriteBuild(

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

Summary of changes:
 Source/cmNinjaNormalTargetGenerator.cxx |   13 +++++++------
 Source/cmNinjaTargetGenerator.cxx       |    8 +++++---
 2 files changed, 12 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list