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)