This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new cc90e40e570 GH-50631: [C++] Scope macOS SDK 11.3 simdjson workaround
to bundled simdjson (#50633)
cc90e40e570 is described below
commit cc90e40e5703f13ef1e38dd728eda93961d336d6
Author: Aaditya Srinivasan <[email protected]>
AuthorDate: Sat Jul 25 18:45:41 2026 +0530
GH-50631: [C++] Scope macOS SDK 11.3 simdjson workaround to bundled
simdjson (#50633)
### Rationale for this change
The workaround introduced for the macOS 11.3 SDK currently uses a global
`add_compile_definitions(SIMDJSON_CONCEPT_DISABLED=1)`.
Since this workaround is only needed when building the bundled simdjson
dependency, scope it to the `simdjson` target inside `build_simdjson()` instead
of applying it globally.
### What changes are included in this PR?
- Move the macOS SDK 11.3 workaround into `build_simdjson()`.
- Replace the global `add_compile_definitions()` with
`target_compile_definitions(simdjson PUBLIC SIMDJSON_CONCEPT_DISABLED=1)`.
* GitHub Issue: #50631
Authored-by: Aaditya Srinivasan <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
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)