Skip to content

Commit a9c18e0

Browse files
committed
Fix Haiku build
1 parent 9afb438 commit a9c18e0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cmake/GhcHelper.cmake

+9
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND (CMAKE_CXX_COMPILER_VERSION V
2222
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
2323
target_link_libraries(filesystem_test xnet)
2424
endif()
25+
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
26+
target_link_libraries(filesystem_test network)
27+
endif()
2528
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
2629
endif()
2730

@@ -34,6 +37,9 @@ if (CMAKE_COMPILER_IS_GNUCXX AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0 O
3437
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
3538
target_link_libraries(${targetName} xnet)
3639
endif()
40+
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
41+
target_link_libraries(${targetName} network)
42+
endif()
3743
target_compile_options(${targetName} PRIVATE $<$<BOOL:${CYGWIN}>:-Wa,-mbig-obj>)
3844
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
3945
endif()
@@ -55,6 +61,9 @@ macro(AddTestExecutableWithStdCpp cppStd)
5561
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
5662
target_link_libraries(filesystem_test_cpp${cppStd} xnet)
5763
endif()
64+
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
65+
target_link_libraries(filesystem_test_cpp${cppStd} network)
66+
endif()
5867
target_compile_options(filesystem_test_cpp${cppStd} PRIVATE
5968
$<$<BOOL:${EMSCRIPTEN}>:-s DISABLE_EXCEPTION_CATCHING=0>
6069
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Werror -Wno-error=deprecated-declarations>

test/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ if(GHC_COVERAGE)
2525
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
2626
target_link_libraries(filesystem_test PUBLIC xnet)
2727
endif()
28+
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
29+
target_link_libraries(filesystem_test PUBLIC network)
30+
endif()
2831
if("cxx_std_17" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
2932
AddTestExecutableWithStdCpp(17 filesystem_test.cpp catch.hpp)
3033
endif()
@@ -38,6 +41,9 @@ else()
3841
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
3942
target_link_libraries(filesystem_test xnet)
4043
endif()
44+
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
45+
target_link_libraries(filesystem_test network)
46+
endif()
4147
SetTestCompileOptions(filesystem_test)
4248
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
4349
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)
7783
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
7884
target_link_libraries(fwd_impl_test xnet)
7985
endif()
86+
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
87+
target_link_libraries(fwd_impl_test network)
88+
endif()
8089
SetTestCompileOptions(fwd_impl_test)
8190
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
8291
target_compile_definitions(fwd_impl_test PRIVATE _CRT_SECURE_NO_WARNINGS WIN32_LEAN_AND_MEAN NOMINMAX)

0 commit comments

Comments
 (0)