From b5e18c859d8095e16276186180e12a0fce124c98 Mon Sep 17 00:00:00 2001 From: Steffen Schuemann Date: Sun, 2 Jun 2019 08:53:18 +0200 Subject: [PATCH] refs #17, run test variant with GHC_WIN_WSTRING_STRING_TYPE enabled on windows ci --- test/CMakeLists.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a601eb7..3a553bf 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,8 +24,22 @@ else() if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) target_compile_definitions(filesystem_test PRIVATE _CRT_SECURE_NO_WARNINGS) endif() - ParseAndAddCatchTests(filesystem_test filesystem_test) + ParseAndAddCatchTests(filesystem_test) AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp) + if(WIN32) + add_executable(filesystem_test_wchar filesystem_test.cpp catch.hpp) + target_link_libraries(filesystem_test_wchar ghc_filesystem) + target_compile_options(filesystem_test_wchar PRIVATE + $<$:-Wall -Wextra -Werror> + $<$:-Wall -Werror> + $<$:/WX>) + if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) + target_compile_definitions(filesystem_test_wchar PRIVATE _CRT_SECURE_NO_WARNINGS GHC_WIN_WSTRING_STRING_TYPE) + else() + target_compile_definitions(filesystem_test_wchar PRIVATE GHC_WIN_WSTRING_STRING_TYPE) + endif() + ParseAndAddCatchTests(filesystem_test_wchar) + endif() endif() add_executable(multifile_test multi1.cpp multi2.cpp catch.hpp)