diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/boost-container/posix-threads.diff | |
Diffstat (limited to 'vcpkg/ports/boost-container/posix-threads.diff')
| -rw-r--r-- | vcpkg/ports/boost-container/posix-threads.diff | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vcpkg/ports/boost-container/posix-threads.diff b/vcpkg/ports/boost-container/posix-threads.diff new file mode 100644 index 0000000..ee82a2e --- /dev/null +++ b/vcpkg/ports/boost-container/posix-threads.diff @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 01e97c5..faf17d4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,6 +15,16 @@ add_library(boost_container + src/synchronized_pool_resource.cpp + src/unsynchronized_pool_resource.cpp + ) ++if(NOT WIN32) ++ set(THREADS_PREFER_PTHREAD_FLAG 1) ++ find_package(Threads REQUIRED) ++ target_link_libraries(boost_container PUBLIC Threads::Threads) ++ if(EMSCRIPTEN) ++ # Boost config needs `-pthread` to see `_POSIX_THREADS`, ++ # but FindTheads.cmake finishes with `CMAKE_HAVE_LIBC_PTHREAD`. ++ target_compile_options(boost_container PUBLIC -pthread) ++ endif() ++endif() + + add_library(Boost::container ALIAS boost_container) + |