summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-14 12:37:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-14 12:37:24 (GMT)
commit21da0f83a21794bdd283210608ca7c127db084ec (patch)
treef57e496e36679d3154bb781de587f843c7ea097e /Source/cmGlobalNinjaGenerator.cxx
parent40a7572e4fc6dcd467130b1fa75f4960ba7c15d6 (diff)
parentf6d4fa63f84a88dbc59020b10fbdb7fb02fa1f9d (diff)
downloadCMake-21da0f83a21794bdd283210608ca7c127db084ec.zip
CMake-21da0f83a21794bdd283210608ca7c127db084ec.tar.gz
CMake-21da0f83a21794bdd283210608ca7c127db084ec.tar.bz2
Merge topic 'relative-paths'
f6d4fa63f8 cmStateDirectory: Comment relative path top directory selection approach f0ffb1e2d4 cmGlobalGenerator: Simplify relative path conversion in AddRuleHash d346805e41 cmLocalCommonGenerator: Select work directory semantically 15fa320071 cmLocalGenerator: Factor out relative path conversion helpers 1879f1bcbc cmLocalCommonGenerator: Factor out relative path conversion helper 1d1d88d3c8 cmMakefileTargetGenerator: Clarify name of relative path conversion helper ec1ea13066 cmDependsFortran: Simplify relative path conversion helper ba7b939831 cmStateDirectory: Rename ConvertToRelPathIf{Not => }Contained ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6122
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index d667575..5cf37da 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1123,10 +1123,8 @@ std::string const& cmGlobalNinjaGenerator::ConvertToNinjaPath(
return f->second;
}
- const auto& ng =
- cm::static_reference_cast<cmLocalNinjaGenerator>(this->LocalGenerators[0]);
- std::string const& bin_dir = ng.GetState()->GetBinaryDirectory();
- std::string convPath = ng.MaybeConvertToRelativePath(bin_dir, path);
+ std::string convPath =
+ this->LocalGenerators[0]->MaybeRelativeToTopBinDir(path);
convPath = this->NinjaOutputPath(convPath);
#ifdef _WIN32
std::replace(convPath.begin(), convPath.end(), '/', '\\');