diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-08 10:21:35 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-10 18:38:52 (GMT) |
commit | b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c (patch) | |
tree | 9d6381c8b950a64756152da2fc0bf7d01361b789 /Source/cmLocalGenerator.cxx | |
parent | 06b71ff9fb41369e6dce0c2b9760d2d546d47dec (diff) | |
download | CMake-b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c.zip CMake-b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c.tar.gz CMake-b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c.tar.bz2 |
cmLocalGenerator: Inline conversion into link computation
Make it possible to invoke this functionality independent of
cmLocalGenerator.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 025b82a..f1b7c6a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1407,7 +1407,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) #endif // Normal behavior. - return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); + std::string relLib = lib; + cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory(); + if (cmOutputConverter::ContainedInDirectory( + stateDir.GetCurrentBinary(), lib, stateDir)) { + relLib = cmOutputConverter::ForceToRelativePath( + stateDir.GetCurrentBinary(), lib); + } + return relLib; } /** |