1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
4 #include "cmMSVC60LinkLineComputer.h"
6 #if defined(_WIN32) && !defined(__CYGWIN__)
7 # include "cmSystemTools.h"
10 class cmOutputConverter;
12 cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(
13 cmOutputConverter* outputConverter, cmStateDirectory const& stateDir)
14 : cmLinkLineComputer(outputConverter, stateDir)
18 std::string cmMSVC60LinkLineComputer::ConvertToLinkReference(
19 std::string const& lib) const
21 #if defined(_WIN32) && !defined(__CYGWIN__)
22 // Work-ardound command line parsing limitations in MSVC 6.0
23 // Search for the last space.
24 std::string::size_type pos = lib.rfind(' ');
25 if (pos != std::string::npos) {
26 // Find the slash after the last space, if any.
27 pos = lib.find('/', pos);
29 // Convert the portion of the path with a space to a short path.
31 if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) {
32 // Append the rest of the path with no space.
33 sp += lib.substr(pos);
39 return this->cmLinkLineComputer::ConvertToLinkReference(lib);