From a560fd391ce54936345a8a204484b76b30db5acb Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Sun, 31 Mar 2019 15:48:57 -0400 Subject: [PATCH 1/2] Remove final remnants of boost thread usage from cmake Because this could be the last boost thread reference, we need to tell cmake to still pass thread compiler flags --- CMakeLists.txt | 8 ++++---- libraries/appbase | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 694f0814aaa..17c3df72451 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,16 +104,12 @@ IF( WIN32 ) set(BOOST_ALL_DYN_LINK OFF) # force dynamic linking for all libraries ENDIF(WIN32) FIND_PACKAGE(Boost 1.67 REQUIRED COMPONENTS - thread date_time filesystem system program_options - serialization chrono unit_test_framework - context - locale iostreams) # Some new stdlibc++s will #error on ; a problem for boost pre-1.69 @@ -121,6 +117,10 @@ if( APPLE AND UNIX ) add_definitions(-DBOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) endif() +set(THREADS_PREFER_PTHREAD_FLAG 1) +find_package(Threads) +link_libraries(Threads::Threads) + if( WIN32 ) message( STATUS "Configuring EOSIO on WIN32") diff --git a/libraries/appbase b/libraries/appbase index 013246f52f1..b6b55f5ff99 160000 --- a/libraries/appbase +++ b/libraries/appbase @@ -1 +1 @@ -Subproject commit 013246f52f13a7bc129193c3a64e6cd0cea44ac0 +Subproject commit b6b55f5ff993f4be954d2aa556538636fbdaabb4 From 8ea813a6abef9e251c90a8ac68aeaa9e3a5c66cf Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Sun, 31 Mar 2019 15:50:20 -0400 Subject: [PATCH 2/2] When building boost on macos, only build the libraries needed by eosio --- scripts/eosio_build_darwin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index e418be9a717..224b0839f1d 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -171,7 +171,8 @@ if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ && cd $BOOST_ROOT \ && ./bootstrap.sh --prefix=$BOOST_ROOT \ - && ./b2 -q -j$(sysctl -in machdep.cpu.core_count) install \ + && ./b2 -q -j$(sysctl -in machdep.cpu.core_count) --with-iostreams --with-date_time --with-filesystem \ + --with-system --with-program_options --with-chrono --with-test install \ && cd .. \ && rm -f boost_$BOOST_VERSION.tar.bz2 \ && rm -rf $BOOST_LINK_LOCATION \