cmOutputConverter: Always set relative path top source and binary together

Refactor to set both at once so we have a single place in the code that
knows both have been set.
This commit is contained in:
Brad King
2022-02-28 10:16:51 -05:00
parent de766bc7e0
commit 43416c48ed
5 changed files with 15 additions and 22 deletions
+6 -7
View File
@@ -1508,13 +1508,12 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
}
// Setup relative path top directories.
if (cmValue relativePathTopSource =
mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE")) {
this->SetRelativePathTopSource(*relativePathTopSource);
}
if (cmValue relativePathTopBinary =
mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY")) {
this->SetRelativePathTopBinary(*relativePathTopBinary);
cmValue relativePathTopSource =
mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE");
cmValue relativePathTopBinary =
mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY");
if (relativePathTopSource && relativePathTopBinary) {
this->SetRelativePathTop(*relativePathTopSource, *relativePathTopBinary);
}
} else {
cmSystemTools::Error("Directory Information file not found");