This is an automated email from the ASF dual-hosted git repository.
raulcd 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 43d5f8b12b GH-50739: [C++] Make simdjson required for static linking
(#50741)
43d5f8b12b is described below
commit 43d5f8b12b4a15a8927c215fb3ad737a54f74b74
Author: Antoine Pitrou <[email protected]>
AuthorDate: Fri Jul 31 09:50:53 2026 +0200
GH-50739: [C++] Make simdjson required for static linking (#50741)
### Rationale for this change
Unlike RapidJSON, simdjson is not header-only and needs to be linked to
explicitly when linking against libarrow.a.
This should fix the JNI builds on the C++ Extra workflow.
### Are these changes tested?
Yes, by existing CI builds.
### Are there any user-facing changes?
No.
* GitHub Issue: #50739
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 4 +---
cpp/src/arrow/CMakeLists.txt | 6 ++++++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 498b2bc042..dd1e5da15e 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2851,9 +2851,7 @@ if(ARROW_WITH_SIMDJSON)
FORCE_ANY_NEWER_VERSION
TRUE
REQUIRED_VERSION
- ${ARROW_SIMDJSON_REQUIRED_VERSION}
- IS_RUNTIME_DEPENDENCY
- FALSE)
+ ${ARROW_SIMDJSON_REQUIRED_VERSION})
if(SIMDJSON_VENDORED)
add_library(arrow::simdjson ALIAS simdjson)
else()
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index f3af530c08..8a1ec4bca9 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -61,6 +61,12 @@ if(ARROW_WITH_LZ4)
endif()
endif()
+if(ARROW_WITH_SIMDJSON)
+ if(simdjson_SOURCE STREQUAL "SYSTEM")
+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS simdjson::simdjson)
+ endif()
+endif()
+
if(ARROW_WITH_SNAPPY)
if(Snappy_SOURCE STREQUAL "SYSTEM")
list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS ${Snappy_TARGET})