diff options
author | Brad King <brad.king@kitware.com> | 2021-05-12 19:51:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-13 16:47:25 (GMT) |
commit | 15fa3200715869d5acb94a282feb301d2e10a0eb (patch) | |
tree | 9c5d6c18b03b2917cc54d7fa2cfa5b9c89d8e4b0 /Source/cmMakefileUtilityTargetGenerator.cxx | |
parent | 1879f1bcbc4e2fbd9eaca4eff351ab928c4a3268 (diff) | |
download | CMake-15fa3200715869d5acb94a282feb301d2e10a0eb.zip CMake-15fa3200715869d5acb94a282feb301d2e10a0eb.tar.gz CMake-15fa3200715869d5acb94a282feb301d2e10a0eb.tar.bz2 |
cmLocalGenerator: Factor out relative path conversion helpers
Most calls to `MaybeConvertToRelativePath` use one of our common work
directories (e.g. top of the build tree) as the local path. Add helpers
for each of the common cases to simplify and clarify call sites.
Diffstat (limited to 'Source/cmMakefileUtilityTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileUtilityTargetGenerator.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index a885b17..7f854ee 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -48,8 +48,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << "# Include any custom commands dependencies for this target.\n" << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->MaybeConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), dependFile)) + this->LocalGenerator->MaybeRelativeToTopBinDir(dependFile)) << "\n\n"; if (!cmSystemTools::FileExists(dependFile)) { // Write an empty dependency file. @@ -78,8 +77,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << "# Include the progress variables for this target.\n" << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->MaybeConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), + this->LocalGenerator->MaybeRelativeToTopBinDir( this->ProgressFileNameFull)) << "\n\n"; } |