mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-02 18:29:17 +08:00
Fix Haiku build
This commit is contained in:
parent
9afb43851d
commit
a9c18e0880
@ -22,6 +22,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND (CMAKE_CXX_COMPILER_VERSION V
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||
target_link_libraries(filesystem_test xnet)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||
target_link_libraries(filesystem_test network)
|
||||
endif()
|
||||
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
|
||||
endif()
|
||||
|
||||
@ -34,6 +37,9 @@ if (CMAKE_COMPILER_IS_GNUCXX AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0 O
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||
target_link_libraries(${targetName} xnet)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||
target_link_libraries(${targetName} network)
|
||||
endif()
|
||||
target_compile_options(${targetName} PRIVATE $<$<BOOL:${CYGWIN}>:-Wa,-mbig-obj>)
|
||||
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
|
||||
endif()
|
||||
@ -55,6 +61,9 @@ macro(AddTestExecutableWithStdCpp cppStd)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||
target_link_libraries(filesystem_test_cpp${cppStd} xnet)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||
target_link_libraries(filesystem_test_cpp${cppStd} network)
|
||||
endif()
|
||||
target_compile_options(filesystem_test_cpp${cppStd} PRIVATE
|
||||
$<$<BOOL:${EMSCRIPTEN}>:-s DISABLE_EXCEPTION_CATCHING=0>
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Werror -Wno-error=deprecated-declarations>
|
||||
|
@ -25,6 +25,9 @@ if(GHC_COVERAGE)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||
target_link_libraries(filesystem_test PUBLIC xnet)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||
target_link_libraries(filesystem_test PUBLIC network)
|
||||
endif()
|
||||
if("cxx_std_17" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
|
||||
AddTestExecutableWithStdCpp(17 filesystem_test.cpp catch.hpp)
|
||||
endif()
|
||||
@ -38,6 +41,9 @@ else()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||
target_link_libraries(filesystem_test xnet)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||
target_link_libraries(filesystem_test network)
|
||||
endif()
|
||||
SetTestCompileOptions(filesystem_test)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
target_compile_definitions(filesystem_test PRIVATE _CRT_SECURE_NO_WARNINGS WIN32_LEAN_AND_MEAN NOMINMAX)
|
||||
@ -77,6 +83,9 @@ target_link_libraries(fwd_impl_test ghc_filesystem)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||
target_link_libraries(fwd_impl_test xnet)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||
target_link_libraries(fwd_impl_test network)
|
||||
endif()
|
||||
SetTestCompileOptions(fwd_impl_test)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
target_compile_definitions(fwd_impl_test PRIVATE _CRT_SECURE_NO_WARNINGS WIN32_LEAN_AND_MEAN NOMINMAX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user