diff options
author | KWSys Upstream <kwrobot@kitware.com> | 2017-04-19 11:58:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-19 12:02:04 (GMT) |
commit | 5785482ce0be9187ff94c1042f8978d2f11285e8 (patch) | |
tree | 8ef6868e8e5dce3e1f70dc27b5c2c240fcd84c0b /Encoding.hxx.in | |
parent | 85841e8bd5e678f69271272db7f838f873347812 (diff) | |
download | CMake-5785482ce0be9187ff94c1042f8978d2f11285e8.zip CMake-5785482ce0be9187ff94c1042f8978d2f11285e8.tar.gz CMake-5785482ce0be9187ff94c1042f8978d2f11285e8.tar.bz2 |
KWSys 2017-04-19 (9f6ffaff)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 9f6ffaff4ed7b639b3523b43f41e70f75271f0cc (master).
Upstream Shortlog
-----------------
Brad King (3):
e71a3406 Encoding: Add ToWindowsExtendedPath function
41b8603c SystemTools: Use Encoding::ToWindowsExtendedPath
edd8b5e0 FStream: Open files on Windows using UNC path
Chuck Atkins (1):
0c4e58ec Silence warnings from newer CMake versions from CMP0048
Diffstat (limited to 'Encoding.hxx.in')
-rw-r--r-- | Encoding.hxx.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Encoding.hxx.in b/Encoding.hxx.in index bf93f50..09691fd 100644 --- a/Encoding.hxx.in +++ b/Encoding.hxx.in @@ -59,6 +59,17 @@ public: static std::string ToNarrow(const std::wstring& str); static std::string ToNarrow(const wchar_t* str); +#if defined(_WIN32) + /** + * Convert the path to an extended length path to avoid MAX_PATH length + * limitations on Windows. If the input is a local path the result will be + * prefixed with \\?\; if the input is instead a network path, the result + * will be prefixed with \\?\UNC\. All output will also be converted to + * absolute paths with Windows-style backslashes. + **/ + static std::wstring ToWindowsExtendedPath(std::string const&); +#endif + #endif // @KWSYS_NAMESPACE@_STL_HAS_WSTRING }; // class Encoding |