mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
refs #71, work on compilation issues on Windows
This commit is contained in:
parent
0282098c13
commit
45d36a8e19
@ -1,6 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.7.2)
|
||||
project(ghcfilesystem)
|
||||
|
||||
if(POLICY CMP0110)
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0110 OLD)
|
||||
endif()
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
cmake_dependent_option(GHC_FILESYSTEM_BUILD_TESTING
|
||||
@ -54,3 +59,6 @@ if(GHC_FILESYSTEM_WITH_INSTALL)
|
||||
install(EXPORT ghcFilesystemConfig NAMESPACE ghcFilesystem:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ghcFilesystem)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0110)
|
||||
cmake_policy(POP)
|
||||
endif()
|
||||
|
@ -2742,7 +2742,8 @@ TEST_CASE("Windows: Long filename support", "[filesystem][path][fs.path.win.long
|
||||
#ifdef GHC_OS_WINDOWS
|
||||
TemporaryDirectory t(TempOpt::change_path);
|
||||
char c = 'A';
|
||||
fs::path dir = "\\\\?\\" + fs::current_path().u8string();
|
||||
fs::path dir{"\\\\?\\"};
|
||||
dir += fs::current_path().u8string();
|
||||
for (; c <= 'Z'; ++c) {
|
||||
std::string part = std::string(16, c);
|
||||
dir /= part;
|
||||
@ -2750,8 +2751,8 @@ TEST_CASE("Windows: Long filename support", "[filesystem][path][fs.path.win.long
|
||||
CHECK(fs::exists(dir));
|
||||
generateFile(dir / "f0");
|
||||
CHECK(fs::exists(dir / "f0"));
|
||||
std::string native = dir.u8string();
|
||||
if (native.substr(0, 4) == "\\\\?\\") {
|
||||
auto native = dir.u8string();
|
||||
if (native.substr(0, 4) == u8"\\\\?\\") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user