diff options
author | Brad King <brad.king@kitware.com> | 2021-05-14 19:38:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-17 14:04:01 (GMT) |
commit | 8526756b61014f780348346ba5fdf0604a02d158 (patch) | |
tree | 875962cd6dd10ef90e65fc64cad8fdfef8dad5b5 /Source/cmMakefileTargetGenerator.cxx | |
parent | 013ec595c8d6971c568cff4f8e457d90a6e8be88 (diff) | |
download | CMake-8526756b61014f780348346ba5fdf0604a02d158.zip CMake-8526756b61014f780348346ba5fdf0604a02d158.tar.gz CMake-8526756b61014f780348346ba5fdf0604a02d158.tar.bz2 |
cmOutputConverter: Adopt relative path conversion helpers
Move them up from cmLocalGenerator and out of cmStateDirectory.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 1cc8434..4542672 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1749,7 +1749,8 @@ public: { // Construct the name of the next object. this->NextObject = this->OutputConverter->ConvertToOutputFormat( - this->MaybeRelativeToCurBinDir(obj), cmOutputConverter::RESPONSE); + this->OutputConverter->MaybeRelativeToCurBinDir(obj), + cmOutputConverter::RESPONSE); // Roll over to next string if the limit will be exceeded. if (this->LengthLimit != std::string::npos && @@ -1770,15 +1771,6 @@ public: void Done() { this->Strings.push_back(this->CurrentString); } private: - std::string MaybeRelativeToCurBinDir(std::string const& path) - { - std::string const& base = this->StateDir.GetCurrentBinary(); - if (!this->StateDir.ContainsBoth(base, path)) { - return path; - } - return cmSystemTools::ForceToRelativePath(base, path); - } - std::vector<std::string>& Strings; cmOutputConverter* OutputConverter; cmStateDirectory StateDir; |