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/cmLinkLineComputer.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/cmLinkLineComputer.cxx')
-rw-r--r-- | Source/cmLinkLineComputer.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 480c005..a3f2968 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -11,10 +11,8 @@ #include "cmGeneratorTarget.h" #include "cmListFileCache.h" #include "cmOutputConverter.h" -#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" -#include "cmSystemTools.h" cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) @@ -52,13 +50,7 @@ void cmLinkLineComputer::SetRelink(bool relink) std::string cmLinkLineComputer::ConvertToLinkReference( std::string const& lib) const { - std::string relLib = lib; - - if (this->StateDir.ContainsBoth(this->StateDir.GetCurrentBinary(), lib)) { - relLib = cmSystemTools::ForceToRelativePath( - this->StateDir.GetCurrentBinary(), lib); - } - return relLib; + return this->OutputConverter->MaybeRelativeToCurBinDir(lib); } std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli) |