diff options
author | Brad King <brad.king@kitware.com> | 2020-07-16 16:02:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-07-16 16:02:54 (GMT) |
commit | ffe425f768570cd6361f0728015f3fe84a2f6850 (patch) | |
tree | 4b8930d2567e178bbbaf997d6aaa3abb813887d0 /Source | |
parent | 5a745cfbe0f4ebbf11c7ec38ea287842a7b2c164 (diff) | |
parent | 99ed39b011f170f8a6c6ca91d6d12c4858a74d22 (diff) | |
download | CMake-ffe425f768570cd6361f0728015f3fe84a2f6850.zip CMake-ffe425f768570cd6361f0728015f3fe84a2f6850.tar.gz CMake-ffe425f768570cd6361f0728015f3fe84a2f6850.tar.bz2 |
Merge branch 'ninja-multi-rsp' into release-3.17
Merge-request: !5020
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 885703f..eed463d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -748,8 +748,13 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement( static_cast<int>(cmSystemTools::CalculateCommandLineLengthLimit()) - globalGen->GetRuleCmdLength(this->LanguageLinkerDeviceRule(config)); - build.RspFile = this->ConvertToNinjaPath(std::string("CMakeFiles/") + - genTarget->GetName() + ".rsp"); + std::string path = localGen.GetHomeRelativeOutputPath(); + if (!path.empty()) { + path += '/'; + } + build.RspFile = this->ConvertToNinjaPath( + cmStrCat(path, "CMakeFiles/", genTarget->GetName(), + globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp")); // Gather order-only dependencies. this->GetLocalGenerator()->AppendTargetDepends( @@ -1157,8 +1162,13 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement( globalGen->GetRuleCmdLength(linkBuild.Rule); } - linkBuild.RspFile = this->ConvertToNinjaPath(std::string("CMakeFiles/") + - gt->GetName() + ".rsp"); + std::string path = localGen.GetHomeRelativeOutputPath(); + if (!path.empty()) { + path += '/'; + } + linkBuild.RspFile = this->ConvertToNinjaPath( + cmStrCat(path, "CMakeFiles/", gt->GetName(), + globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp")); // Gather order-only dependencies. this->GetLocalGenerator()->AppendTargetDepends(gt, linkBuild.OrderOnlyDeps, |