diff options
author | Brad King <brad.king@kitware.com> | 2022-02-28 15:16:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-28 15:25:18 (GMT) |
commit | 43416c48ed6bb7d3b8063ac4ea1ba02a4aab828e (patch) | |
tree | eff805381983587d9775f726ff40d9caba37aeea /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | de766bc7e0f4a856abc712e64e4248e966ced37f (diff) | |
download | CMake-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.cxx | 13 |
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"); |