diff options
author | Brad King <brad.king@kitware.com> | 2018-01-25 13:36:21 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-25 13:36:47 (GMT) |
commit | d1d8daf15adfc6fc23cabbf37e230d0445b70405 (patch) | |
tree | cdfd36e55ab7fceb17ad5887af61fea9befb18cb /Source/cmNinjaTargetGenerator.cxx | |
parent | 499e36d932910186e1c1db1cc0d18fe93e47ee55 (diff) | |
parent | c4dc6485eb3bd51fdc88eee03218b9755c373282 (diff) | |
download | CMake-d1d8daf15adfc6fc23cabbf37e230d0445b70405.zip CMake-d1d8daf15adfc6fc23cabbf37e230d0445b70405.tar.gz CMake-d1d8daf15adfc6fc23cabbf37e230d0445b70405.tar.bz2 |
Merge topic 'xl-qoptfile'
c4dc6485 XL: Enable use of response files for includes and objects
e342e410 Makefile,Ninja: Use tool-specific response file flag for include dirs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1691
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 4f37882..a442463 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -447,14 +447,20 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string flags = "$FLAGS"; std::string rspfile; std::string rspcontent; - std::string responseFlag; bool const lang_supports_response = !(lang == "RC" || lang == "CUDA"); if (lang_supports_response && this->ForceResponseFile()) { + std::string const responseFlagVar = + "CMAKE_" + lang + "_RESPONSE_FILE_FLAG"; + std::string responseFlag = + this->Makefile->GetSafeDefinition(responseFlagVar); + if (responseFlag.empty()) { + responseFlag = "@"; + } rspfile = "$RSP_FILE"; - responseFlag = "@" + rspfile; + responseFlag += rspfile; rspcontent = " $DEFINES $INCLUDES $FLAGS"; - flags = responseFlag; + flags = std::move(responseFlag); vars.Defines = ""; vars.Includes = ""; } |