diff options
author | Brad King <brad.king@kitware.com> | 2020-07-17 12:49:23 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-17 12:49:36 (GMT) |
commit | 290a68b94ce43b44eb84190ec2140d1710718836 (patch) | |
tree | bb543782f9201e5e7890654e897bdf4398262006 | |
parent | d421274e3e11a0e6480358faa8a8e5cf48d7b3c2 (diff) | |
parent | 99ed39b011f170f8a6c6ca91d6d12c4858a74d22 (diff) | |
download | CMake-290a68b94ce43b44eb84190ec2140d1710718836.zip CMake-290a68b94ce43b44eb84190ec2140d1710718836.tar.gz CMake-290a68b94ce43b44eb84190ec2140d1710718836.tar.bz2 |
Merge topic 'ninja-multi-rsp' into release-3.18
99ed39b011 Ninja Multi-Config: Make link response files per-config
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5020
-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 b92548f..0f01f85 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -733,8 +733,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( @@ -1154,8 +1159,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, |