diff --git a/cmake/flags.cmake b/cmake/flags.cmake index 6b34e9ab..78b1e7ef 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -67,7 +67,7 @@ list(APPEND PROJECT_CXXFLAGS_LIST -std=gnu++${CMAKE_CXX_STANDARD} ) -if(PROJECT_STATIC_LINK) +if(NOT PROJECT_IS_DARWIN AND PROJECT_STATIC_LINK) list(APPEND PROJECT_CMAKE_EXE_LINKER_FLAGS -static-libgcc -static-libstdc++ diff --git a/cmake/libraries.cmake b/cmake/libraries.cmake index 5f955464..743fa36d 100644 --- a/cmake/libraries.cmake +++ b/cmake/libraries.cmake @@ -59,7 +59,7 @@ if(PROJECT_BUILD) winspool ws2_32 ) - else() + elseif(NOT PROJECT_IS_DARWIN) link_libraries( uring ) diff --git a/repertory/repertory_test/include/fixtures/fuse_fixture.hpp b/repertory/repertory_test/include/fixtures/fuse_fixture.hpp index eaa59662..5442beb6 100644 --- a/repertory/repertory_test/include/fixtures/fuse_fixture.hpp +++ b/repertory/repertory_test/include/fixtures/fuse_fixture.hpp @@ -427,15 +427,11 @@ std::string fuse_test::mount_location; template std::string fuse_test::mount_location2; -#if defined(__linux__) using fuse_provider_types = ::testing::Types; // using fuse_provider_types = // ::testing::Types; -#else // !defined(__linux__) -build fails here -#endif // defined(_WIN32) } // namespace repertory #endif // !defined(_WIN32) diff --git a/support/src/utils/unix.cpp b/support/src/utils/unix.cpp index 90b55f11..7d647690 100644 --- a/support/src/utils/unix.cpp +++ b/support/src/utils/unix.cpp @@ -25,11 +25,13 @@ #include "utils/collection.hpp" namespace repertory::utils { -#if !defined(__APPLE__) -auto convert_to_uint64(const pthread_t &thread) -> std::uint64_t { +auto convert_to_uint64(pthread_t thread) -> std::uint64_t { +#if defined(__APPLE__) + return reinterpret_cast(thread); +#else // defined(__APPLE__) return static_cast(thread); +#endif // defined(__APPLE__) } -#endif // !defined(__APPLE__) auto get_last_error_code() -> int { return errno; }