summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGhsMultiGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-12 19:50:22 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-12 19:53:26 (GMT)
commit09bee3bee137af72f57ee10327e4e5f689ce7e90 (patch)
tree1faa9307cc5c12c89949c8f1d461baf0055d15e1 /Source/cmGlobalGhsMultiGenerator.cxx
parentf69079577a50ab203b6355a22a2e2243f5480628 (diff)
downloadCMake-09bee3bee137af72f57ee10327e4e5f689ce7e90.zip
CMake-09bee3bee137af72f57ee10327e4e5f689ce7e90.tar.gz
CMake-09bee3bee137af72f57ee10327e4e5f689ce7e90.tar.bz2
cmGlobalGhsMultiGenerator: Simplify relative path conversion logic
Our call to `MaybeConvertToRelativePath` uses paths that always pass the "maybe" checks. Use `ForceToRelativePath` directly.
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 172cf3f..7cf3e93 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -375,7 +375,7 @@ void cmGlobalGhsMultiGenerator::WriteSubProjects(std::ostream& fout,
}
void cmGlobalGhsMultiGenerator::WriteProjectLine(
- std::ostream& fout, cmGeneratorTarget const* target, cmLocalGenerator* root,
+ std::ostream& fout, cmGeneratorTarget const* target,
std::string& rootBinaryDir)
{
cmProp projName = target->GetProperty("GENERATOR_FILE_NAME");
@@ -383,7 +383,7 @@ void cmGlobalGhsMultiGenerator::WriteProjectLine(
if (projName && projType) {
cmLocalGenerator* lg = target->GetLocalGenerator();
std::string dir = lg->GetCurrentBinaryDirectory();
- dir = root->MaybeConvertToRelativePath(rootBinaryDir, dir);
+ dir = cmSystemTools::ForceToRelativePath(rootBinaryDir, dir);
if (dir == ".") {
dir.clear();
} else {
@@ -433,7 +433,7 @@ void cmGlobalGhsMultiGenerator::WriteTargets(cmLocalGenerator* root)
target->GetName(), "] had a cycle.\n"));
} else {
for (auto& tgt : build) {
- this->WriteProjectLine(fbld, tgt, root, rootBinaryDir);
+ this->WriteProjectLine(fbld, tgt, rootBinaryDir);
}
}
fbld.Close();
@@ -490,7 +490,7 @@ void cmGlobalGhsMultiGenerator::WriteAllTarget(
target->GetType() == cmStateEnums::SHARED_LIBRARY) {
continue;
}
- this->WriteProjectLine(fbld, target, root, rootBinaryDir);
+ this->WriteProjectLine(fbld, target, rootBinaryDir);
}
}
fbld.Close();