refs #68, updated readme, fix for failing CI on VS2019.

This commit is contained in:
Steffen Schuemann 2020-08-29 20:34:59 +02:00
parent a47a874bee
commit f6e886f999
3 changed files with 15 additions and 9 deletions

View File

@ -492,8 +492,9 @@ to the expected behavior.
* Pull request [#69](https://github.com/gulrak/filesystem/pull/69), use `wchar_t` versions of * Pull request [#69](https://github.com/gulrak/filesystem/pull/69), use `wchar_t` versions of
`std::fstream` from `ghc::filesystem::fstream` wrappers on Windows if using GCC with libc++. `std::fstream` from `ghc::filesystem::fstream` wrappers on Windows if using GCC with libc++.
* Bugfix for [#68](https://github.com/gulrak/filesystem/issues/68), better handling of * Bugfix for [#68](https://github.com/gulrak/filesystem/issues/68), better handling of
permission issues for directory iterators when using `fs::directory_options::skip_permission_denied`. permission issues for directory iterators when using `fs::directory_options::skip_permission_denied`
* Bugfix for [#63](https://github.com/gulrak/filesystem/issues/63), fixed issues on Windows and initial support for compilation with emscripten.
* Bugfix for [#63](https://github.com/gulrak/filesystem/issues/63), fixed issues on Windows
with clang++ and C++17. with clang++ and C++17.
* Pull request [#62](https://github.com/gulrak/filesystem/pull/62), various fixes for * Pull request [#62](https://github.com/gulrak/filesystem/pull/62), various fixes for
better Android support, thanks for the PR better Android support, thanks for the PR

View File

@ -144,7 +144,7 @@ function(ParseAndAddCatchTests_ParseFile SourceFile TestTarget)
if("${TestType}" STREQUAL "SCENARIO") if("${TestType}" STREQUAL "SCENARIO")
set(Name "Scenario: ${Name}") set(Name "Scenario: ${Name}")
endif() endif()
if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND TestFixture) if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND "${TestType}" MATCHES "(CATCH_)?TEST_CASE_METHOD" AND TestFixture )
set(CTestName "${TestFixture}:${Name}") set(CTestName "${TestFixture}:${Name}")
else() else()
set(CTestName "${Name}") set(CTestName "${Name}")
@ -189,24 +189,29 @@ function(ParseAndAddCatchTests_ParseFile SourceFile TestTarget)
# Escape commas in the test spec # Escape commas in the test spec
string(REPLACE "," "\\," Name ${Name}) string(REPLACE "," "\\," Name ${Name})
# Work around CMake 3.18.0 change in `add_test()`, before the escaped quotes were neccessary,
# only with CMake 3.18.0 the escaped double quotes confuse the call. This change is reverted in 3.18.1
if(NOT ${CMAKE_VERSION} VERSION_EQUAL "3.18")
set(CTestName "\"${CTestName}\"")
endif()
# Add the test and set its properties # Add the test and set its properties
add_test(NAME "\"${CTestName}\"" COMMAND ${OptionalCatchTestLauncher} $<TARGET_FILE:${TestTarget}> ${Name} ${AdditionalCatchParameters}) add_test(NAME "${CTestName}" COMMAND ${OptionalCatchTestLauncher} $<TARGET_FILE:${TestTarget}> ${Name} ${AdditionalCatchParameters})
# Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead # Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead
if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_GREATER "3.8") if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_GREATER "3.8")
ParseAndAddCatchTests_PrintDebugMessage("Setting DISABLED test property") ParseAndAddCatchTests_PrintDebugMessage("Setting DISABLED test property")
set_tests_properties("\"${CTestName}\"" PROPERTIES DISABLED ON) set_tests_properties("${CTestName}" PROPERTIES DISABLED ON)
else() else()
set_tests_properties("\"${CTestName}\"" PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran" set_tests_properties("${CTestName}" PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran"
LABELS "${Labels}") LABELS "${Labels}")
endif() endif()
set_property( set_property(
TARGET ${TestTarget} TARGET ${TestTarget}
APPEND APPEND
PROPERTY ParseAndAddCatchTests_TESTS "\"${CTestName}\"") PROPERTY ParseAndAddCatchTests_TESTS "${CTestName}")
set_property( set_property(
SOURCE ${SourceFile} SOURCE ${SourceFile}
APPEND APPEND
PROPERTY ParseAndAddCatchTests_TESTS "\"${CTestName}\"") PROPERTY ParseAndAddCatchTests_TESTS "${CTestName}")
endif() endif()

View File

@ -2518,7 +2518,7 @@ TEST_CASE("30.10.15.34 space", "[filesystem][operations][fs.op.space]")
CHECK(si.free >= si.available); CHECK(si.free >= si.available);
CHECK(!ec); CHECK(!ec);
} }
#ifdef GHC_OS_WEB // statvfs under emscripten always returns a result, so this tests would fail #ifndef GHC_OS_WEB // statvfs under emscripten always returns a result, so this tests would fail
{ {
std::error_code ec; std::error_code ec;
fs::space_info si; fs::space_info si;