/src/CMake/Source/cmMSVC60LinkLineComputer.cxx
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst or https://cmake.org/licensing for details. */ |
3 | | |
4 | | #include "cmMSVC60LinkLineComputer.h" |
5 | | |
6 | | #if defined(_WIN32) && !defined(__CYGWIN__) |
7 | | # include "cmSystemTools.h" |
8 | | #endif |
9 | | |
10 | | class cmOutputConverter; |
11 | | |
12 | | cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer( |
13 | | cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) |
14 | 0 | : cmLinkLineComputer(outputConverter, stateDir) |
15 | 0 | { |
16 | 0 | } |
17 | | |
18 | | std::string cmMSVC60LinkLineComputer::ConvertToLinkReference( |
19 | | std::string const& lib) const |
20 | 0 | { |
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); |
28 | | |
29 | | // Convert the portion of the path with a space to a short path. |
30 | | std::string sp; |
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); |
34 | | return sp; |
35 | | } |
36 | | } |
37 | | #endif |
38 | |
|
39 | 0 | return this->cmLinkLineComputer::ConvertToLinkReference(lib); |
40 | 0 | } |