diff options
author | Brad King <brad.king@kitware.com> | 2017-03-22 12:49:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-03-22 12:50:05 (GMT) |
commit | b5d8a6de4815ead8b342f7862cd0726b13a03a47 (patch) | |
tree | aa199b96979fcea99e5eb1d5ae038a920032a8ca /Source/cmNinjaTargetGenerator.cxx | |
parent | 59032a38471c27c547ed76730c2643a5457e6abd (diff) | |
parent | feaea0658c9cbd4345f698a22452fe3a08a194a3 (diff) | |
download | CMake-b5d8a6de4815ead8b342f7862cd0726b13a03a47.zip CMake-b5d8a6de4815ead8b342f7862cd0726b13a03a47.tar.gz CMake-b5d8a6de4815ead8b342f7862cd0726b13a03a47.tar.bz2 |
Merge topic 'cuda_no_ninja_response_support'
feaea065 CUDA: Disable support for using response files.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !596
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 5866950..e233f12 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -410,7 +410,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"; @@ -935,9 +936,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( |