summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-28 15:16:51 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-28 15:25:18 (GMT)
commit43416c48ed6bb7d3b8063ac4ea1ba02a4aab828e (patch)
treeeff805381983587d9775f726ff40d9caba37aeea /Source/cmLocalUnixMakefileGenerator3.cxx
parentde766bc7e0f4a856abc712e64e4248e966ced37f (diff)
downloadCMake-43416c48ed6bb7d3b8063ac4ea1ba02a4aab828e.zip
CMake-43416c48ed6bb7d3b8063ac4ea1ba02a4aab828e.tar.gz
CMake-43416c48ed6bb7d3b8063ac4ea1ba02a4aab828e.tar.bz2
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.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index e123cf9..7c4af7d 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -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");