diff options
author | Brad King <brad.king@kitware.com> | 2021-05-12 18:38:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-13 16:47:25 (GMT) |
commit | 1d1d88d3c8b6745b31c220599f536fd50bf5cbe9 (patch) | |
tree | 9b846a2c4bcb0760683b7db8b22dceb812c28c16 | |
parent | ec1ea13066e1b65bfd56ae62bda036f13c950c2d (diff) | |
download | CMake-1d1d88d3c8b6745b31c220599f536fd50bf5cbe9.zip CMake-1d1d88d3c8b6745b31c220599f536fd50bf5cbe9.tar.gz CMake-1d1d88d3c8b6745b31c220599f536fd50bf5cbe9.tar.bz2 |
cmMakefileTargetGenerator: Clarify name of relative path conversion helper
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e07e722..bec7805 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1775,7 +1775,7 @@ public: { // Construct the name of the next object. this->NextObject = this->OutputConverter->ConvertToOutputFormat( - this->MaybeConvertToRelativePath(obj), cmOutputConverter::RESPONSE); + this->MaybeRelativeToCurBinDir(obj), cmOutputConverter::RESPONSE); // Roll over to next string if the limit will be exceeded. if (this->LengthLimit != std::string::npos && @@ -1796,13 +1796,13 @@ public: void Done() { this->Strings.push_back(this->CurrentString); } private: - std::string MaybeConvertToRelativePath(std::string const& obj) + std::string MaybeRelativeToCurBinDir(std::string const& path) { - if (!this->StateDir.ContainsBoth(this->StateDir.GetCurrentBinary(), obj)) { - return obj; + std::string const& base = this->StateDir.GetCurrentBinary(); + if (!this->StateDir.ContainsBoth(base, path)) { + return path; } - return cmSystemTools::ForceToRelativePath( - this->StateDir.GetCurrentBinary(), obj); + return cmSystemTools::ForceToRelativePath(base, path); } std::vector<std::string>& Strings; |