mirror of
https://github.com/gulrak/filesystem.git
synced 2026-07-30 08:16:12 +08:00
Update CMake test configuration for standardized filesystem support
Refactored to use `AddExecutableWithStdFS` for conditional standard filesystem testing, ensuring proper linking and test setup only when the target is available.
This commit is contained in:
parent
6dfddd981e
commit
134f5e61be
@ -97,12 +97,13 @@ if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
endif()
|
||||
add_test(fwd_impl_test fwd_impl_test)
|
||||
|
||||
if("cxx_std_17" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
|
||||
add_executable(fs_std_header_test fs_std_header_test.cpp fs_std_fwd_header_test.cpp)
|
||||
target_link_libraries(fs_std_header_test ghc_filesystem)
|
||||
target_compile_features(fs_std_header_test PRIVATE cxx_std_17)
|
||||
SetTestCompileOptions(fs_std_header_test)
|
||||
add_test(fs_std_header_test fs_std_header_test)
|
||||
if(GHC_FILESYSTEM_BUILD_STD_TESTING)
|
||||
AddExecutableWithStdFS(fs_std_header_test fs_std_header_test.cpp fs_std_fwd_header_test.cpp)
|
||||
if(TARGET fs_std_header_test)
|
||||
target_link_libraries(fs_std_header_test ghc_filesystem)
|
||||
SetTestCompileOptions(fs_std_header_test)
|
||||
add_test(fs_std_header_test fs_std_header_test)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(exception exception.cpp)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user