diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-04 20:56:32 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-06 18:02:10 (GMT) |
commit | 20e62f74c5a030a25fe1c3a6c835d67eea152d8f (patch) | |
tree | 8b6d869534acbd674cfb6794f02887b72a917a9d /Source/cmLocalGenerator.cxx | |
parent | fd93b3605bc931b5ce2386816973e106fa1ec646 (diff) | |
download | CMake-20e62f74c5a030a25fe1c3a6c835d67eea152d8f.zip CMake-20e62f74c5a030a25fe1c3a6c835d67eea152d8f.tar.gz CMake-20e62f74c5a030a25fe1c3a6c835d67eea152d8f.tar.bz2 |
cmLocalGenerator: Simplify ConvertToLinkReference
Make conversion to output format the caller responsibility, so that the
method only 'converts to a link reference'.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f24b717..b2569a2 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1374,8 +1374,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, - OutputFormat format) +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) { #if defined(_WIN32) && !defined(__CYGWIN__) // Work-ardound command line parsing limitations in MSVC 6.0 @@ -1392,17 +1391,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, // Append the rest of the path with no space. sp += lib.substr(pos); - // Convert to an output path. - return this->ConvertToOutputFormat(sp.c_str(), format); + return sp; } } } #endif // Normal behavior. - return this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib), - format); + return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); } /** @@ -1517,7 +1513,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, continue; } if (li->IsPath) { - linkLibs += this->ConvertToLinkReference(li->Value, shellFormat); + linkLibs += this->ConvertToOutputFormat( + this->ConvertToLinkReference(li->Value), shellFormat); } else { linkLibs += li->Value; } |