From 71e0b7480bc312090ee295b21ae5a0456b70af9a Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sun, 25 May 2025 05:14:14 +0800 Subject: [PATCH] Darwin ppc: assume boost 1.81+ by default, adjust build setting --- build/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git build/CMakeLists.txt build/CMakeLists.txt index bc936e18..3603d8c0 100644 --- build/CMakeLists.txt +++ build/CMakeLists.txt @@ -38,6 +38,7 @@ option(WITH_ADDRSANITIZER "Build with address sanitizer unix only" OFF) option(WITH_THREADSANITIZER "Build with thread sanitizer unix only" OFF) option(WITH_UNDEFSANITIZER "Build with undefined sanitizer unix only" OFF) +option(WITH_LEGACY_BOOST "Build with Boost <1.81 on macOS ppc" OFF) option(BUILD_TESTING "Build tests" OFF) IF(BUILD_TESTING) @@ -222,7 +223,7 @@ # Use std::atomic instead of GCC builtins on macOS PowerPC: # For more information refer to: https://github.com/PurpleI2P/i2pd/issues/1726#issuecomment-1306335111 # This has been fixed in Boost 1.81, nevertheless we retain the setting for the sake of compatibility. -if(APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc") +if(WITH_LEGACY_BOOST) add_definitions(-DBOOST_SP_USE_STD_ATOMIC) endif()