gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
MIT License
1.34k stars 173 forks source link

filesystem.hpp, add support for Haiku #163

Closed Begasus closed 1 year ago

Begasus commented 1 year ago

Don't merge yet, need to see if I can find a way to link it to libnetwork on Haiku (for bind and socket).

jessicah commented 1 year ago

https://github.com/gulrak/filesystem/blob/master/cmake/GhcHelper.cmake#L48

Add something like:

if (HAIKU)
  target_link_libraries(${targetName} -lnetwork)
endif()
jessicah commented 1 year ago

You may also need for the second macro, depends which part(s) require libnetwork.

Begasus commented 1 year ago

@jessicah thanks for the tip, following the fix for Solaris I managed to get a full build. :) patch comming in later :)

https://github.com/gulrak/filesystem/commit/91e71f7f5430a703b27d297dad7658be347f8b39

Begasus commented 1 year ago

Should be OK now, did a clean build on Haiku with this PR as a patch, ran the tests (95% passed), only thing I'm missing is an option to disable Werror, but got a fix for that from Gentoo: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-cpp/gulrak-filesystem/gulrak-filesystem-1.5.12.ebuild#n22

Begasus commented 1 year ago

Would be nice if this gets merged before a new release: https://github.com/gulrak/filesystem/issues/164 :)

Created a PR at haikuports to have this available on Haiku: https://github.com/haikuports/haikuports/pull/7865

gulrak commented 1 year ago

Looks good to me. If the pipeline goes through, I'll merge it. Thanks for the work!