| 10 | #ifdef __CYGWIN__ |
| 11 | # include <sys/cygwin.h> |
| 12 | std::string CMakeToWixPath(std::string const& cygpath) |
| 13 | { |
| 14 | std::vector<char> winpath_chars; |
| 15 | ssize_t winpath_size; |
| 16 | |
| 17 | // Get the required buffer size. |
| 18 | winpath_size = |
| 19 | cygwin_conv_path(CCP_POSIX_TO_WIN_A, cygpath.c_str(), nullptr, 0); |
| 20 | if (winpath_size <= 0) { |
| 21 | return cygpath; |
| 22 | } |
| 23 | |
| 24 | winpath_chars.assign(static_cast<size_t>(winpath_size) + 1, '\0'); |
| 25 | |
| 26 | winpath_size = cygwin_conv_path(CCP_POSIX_TO_WIN_A, cygpath.c_str(), |
| 27 | winpath_chars.data(), winpath_size); |
| 28 | if (winpath_size < 0) { |
| 29 | return cygpath; |
| 30 | } |
| 31 | |
| 32 | return cmTrimWhitespace(winpath_chars.data()); |
| 33 | } |
| 34 | #else |
| 35 | std::string CMakeToWixPath(std::string const& path) |
| 36 | { |
no test coverage detected
searching dependent graphs…