@@ -684,27 +684,18 @@ if(TARGET simdjson::simdjson)
684684 if (WIN32 )
685685 # On Windows, always use header-only mode to avoid linking issues with
686686 # vcpkg-provided simdjson. The vcpkg simdjson target may not properly
687- # propagate SIMDJSON_HEADER_ONLY, so we force it ourselves.
687+ # propagate SIMDJSON_HEADER_ONLY, so we force it ourselves by adding
688+ # a global compile definition.
688689 set (ARROW_SIMDJSON_FORCE_HEADER_ONLY TRUE )
690+ add_compile_definitions (SIMDJSON_HEADER_ONLY)
689691 endif ()
690692endif ()
691693
692- # Set SIMDJSON_HEADER_ONLY for testing sources that use simdjson
693- if (ARROW_SIMDJSON_FORCE_HEADER_ONLY)
694- set_source_files_properties (testing/gtest_util.cc PROPERTIES COMPILE_DEFINITIONS
695- SIMDJSON_HEADER_ONLY)
696- endif ()
697-
698694#
699695# Configure the base Arrow libraries
700696#
701697
702698if (ARROW_BUILD_INTEGRATION OR ARROW_BUILD_TESTS)
703- if (ARROW_SIMDJSON_FORCE_HEADER_ONLY)
704- set_source_files_properties (integration/json_integration.cc
705- integration/json_internal.cc
706- PROPERTIES COMPILE_DEFINITIONS SIMDJSON_HEADER_ONLY)
707- endif ()
708699 arrow_add_object_library(ARROW_INTEGRATION integration/json_integration.cc
709700 integration/json_internal.cc)
710701 foreach (ARROW_INTEGRATION_TARGET ${ARROW_INTEGRATION_TARGETS} )
@@ -1069,21 +1060,6 @@ if(ARROW_JSON)
10691060 PROPERTIES COMPILE_DEFINITIONS SIMDJSON_IMPLEMENTATION
10701061 SKIP_UNITY_BUILD_INCLUSION ON )
10711062 endif ()
1072- # When forcing header-only mode, all source files using simdjson need the
1073- # SIMDJSON_HEADER_ONLY definition so they don't expect external library linkage
1074- if (ARROW_SIMDJSON_FORCE_HEADER_ONLY)
1075- set (ARROW_JSON_SIMDJSON_SOURCES
1076- extension/fixed_shape_tensor.cc
1077- extension/opaque.cc
1078- json/chunker.cc
1079- json/converter.cc
1080- json/from_string.cc
1081- json/object_parser.cc
1082- json/parser.cc
1083- json/reader.cc)
1084- set_source_files_properties (${ARROW_JSON_SIMDJSON_SOURCES}
1085- PROPERTIES COMPILE_DEFINITIONS SIMDJSON_HEADER_ONLY)
1086- endif ()
10871063 endif ()
10881064 arrow_add_object_library(ARROW_JSON
10891065 extension/fixed_shape_tensor.cc
0 commit comments