File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ else()
1717 option (GHC_FILESYSTEM_BUILD_TESTING "Enable tests" OFF )
1818 option (GHC_FILESYSTEM_WITH_INSTALL "With install target" ON )
1919endif ()
20+ option (GHC_FILESYSTEM_BUILD_STD_TESTING "Enable STD tests" ${GHC_FILESYSTEM_BUILD_TESTING} )
21+ if (NOT DEFINED GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
22+ set (GHC_FILESYSTEM_TEST_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES} )
23+ endif ()
2024
2125if (NOT DEFINED CMAKE_CXX_STANDARD)
2226 set (CMAKE_CXX_STANDARD 11)
Original file line number Diff line number Diff line change 2929 set_target_properties (filesystem_test PROPERTIES LINK_FLAGS "-g4 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1" )
3030 endif ()
3131 ParseAndAddCatchTests(filesystem_test)
32- AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp)
32+ if (GHC_FILESYSTEM_BUILD_STD_TESTING)
33+ AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp)
34+ endif ()
3335 if (WIN32 )
3436 add_executable (filesystem_test_char filesystem_test.cpp catch.hpp)
3537 target_link_libraries (filesystem_test_char ghc_filesystem)
@@ -44,10 +46,10 @@ else()
4446 endif ()
4547 ParseAndAddCatchTests(filesystem_test_char)
4648 endif ()
47- if ("cxx_std_17" IN_LIST CMAKE_CXX_COMPILE_FEATURES )
49+ if ("cxx_std_17" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES )
4850 AddTestExecutableWithStdCpp(17 filesystem_test.cpp catch.hpp)
4951 endif ()
50- if ("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES )
52+ if ("cxx_std_20" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES )
5153 AddTestExecutableWithStdCpp(20 filesystem_test.cpp catch.hpp)
5254 endif ()
5355endif ()
You can’t perform that action at this time.
0 commit comments