Skip to content

Commit df9f4fd

Browse files
committed
cmake
1 parent 3944899 commit df9f4fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/src/arrow/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,14 @@ if(TARGET simdjson::simdjson)
757757
endif()
758758

759759
message(STATUS "simdjson: ARROW_SIMDJSON_HEADER_ONLY=${ARROW_SIMDJSON_HEADER_ONLY}")
760+
761+
# When using header-only mode, add the compile definition at the directory level
762+
# to ensure all translation units that include simdjson.h get the definition.
763+
# This is more robust than relying solely on target_compile_definitions propagation,
764+
# which can have issues with OBJECT libraries on some platforms (e.g., Windows MSVC).
765+
if(ARROW_SIMDJSON_HEADER_ONLY)
766+
add_compile_definitions(SIMDJSON_HEADER_ONLY)
767+
endif()
760768
endif()
761769

762770
#

0 commit comments

Comments
 (0)