From 4c4d64ce1db9de0c26fd1ad22c6d86926c2c6e7e Mon Sep 17 00:00:00 2001 From: Aaditya Srinivasan Date: Sat, 25 Jul 2026 07:00:47 +0530 Subject: [PATCH] Move SIMDJson MacOS 11.3 SDK workaround --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 895b88118e4..4bef30f7df0 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -410,15 +410,6 @@ if(ARROW_AZURE) set(ARROW_WITH_AZURE_SDK ON) endif() -# The macOS 11.3 SDK has incomplete C++20 concepts support, which prevents -# simdjson headers from compiling. Disable simdjson concepts for this SDK. -if(ARROW_JSON - AND CMAKE_OSX_SYSROOT - AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11\\.3\\.sdk$") - message(STATUS "Disabling simdjson concepts for macOS SDK 11.3") - add_compile_definitions(SIMDJSON_CONCEPT_DISABLED=1) -endif() - if(ARROW_JSON OR ARROW_FLIGHT_SQL_ODBC) set(ARROW_WITH_RAPIDJSON ON) endif() @@ -2832,6 +2823,13 @@ function(build_simdjson) fetchcontent_makeavailable(simdjson) + # The macOS 11.3 SDK has incomplete C++20 concepts support, which prevents + # simdjson headers from compiling. Disable simdjson concepts for this SDK. + if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11\\.3\\.sdk$") + message(STATUS "Disabling simdjson concepts for macOS SDK 11.3") + target_compile_definitions(simdjson PUBLIC SIMDJSON_CONCEPT_DISABLED=1) + endif() + set(SIMDJSON_VENDORED TRUE PARENT_SCOPE)