File tree Expand file tree Collapse file tree 7 files changed +21
-9
lines changed Expand file tree Collapse file tree 7 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -351,12 +351,6 @@ endif()
351
351
352
352
include (SetupCxxFlags)
353
353
354
- if (${CMAKE_CXX_FLAGS_DEBUG} MATCHES "-Og" )
355
- # GH-47475: xxhash fails inlining when -Og is used.
356
- # See: https://github.com/Cyan4973/xxHash/issues/943
357
- add_definitions (-DXXH_NO_INLINE_HINTS)
358
- endif ()
359
-
360
354
#
361
355
# Linker flags
362
356
#
Original file line number Diff line number Diff line change @@ -371,6 +371,13 @@ add_library(arrow::flatbuffers INTERFACE IMPORTED)
371
371
target_include_directories (arrow::flatbuffers
372
372
INTERFACE "${THIRDPARTY_DIR} /flatbuffers/include" )
373
373
374
+ add_library (arrow::xxhash INTERFACE IMPORTED )
375
+ # GH-47475: xxhash fails inlining when -Og is
376
+ # used. -DCMAKE_BUILD_TYPE=Debug may use -Og.
377
+ # See: https://github.com/Cyan4973/xxHash/issues/943
378
+ target_compile_definitions (arrow::xxhash
379
+ INTERFACE "$<$<CONFIG:Debug>:XXH_NO_INLINE_HINTS>" )
380
+
374
381
# ----------------------------------------------------------------------
375
382
# Some EP's require other EP's
376
383
Original file line number Diff line number Diff line change @@ -402,6 +402,9 @@ arrow_add_object_library(ARROW_ARRAY
402
402
array/statistics.cc
403
403
array/util.cc
404
404
array/validate.cc)
405
+ foreach (target ${ARROW_ARRAY_TARGETS} )
406
+ target_link_libraries (${target} PRIVATE arrow::xxhash)
407
+ endforeach ()
405
408
406
409
arrow_add_object_library(ARROW_IO
407
410
io/buffered.cc
@@ -865,6 +868,7 @@ if(ARROW_COMPUTE)
865
868
${ARROW_VERSION_SCRIPT_FLAGS} # Defined in cpp/arrow/CMakeLists.txt
866
869
)
867
870
foreach (LIB_TARGET ${ARROW_COMPUTE_LIBRARIES} )
871
+ target_link_libraries (${LIB_TARGET} PRIVATE arrow::xxhash)
868
872
target_compile_definitions (${LIB_TARGET} PRIVATE ARROW_COMPUTE_EXPORTING)
869
873
endforeach ()
870
874
@@ -874,6 +878,9 @@ if(ARROW_COMPUTE)
874
878
endif ()
875
879
876
880
arrow_add_object_library(ARROW_COMPUTE_CORE ${ARROW_COMPUTE_SRCS} )
881
+ foreach (target ${ARROW_COMPUTE_CORE_TARGETS} )
882
+ target_link_libraries (${target} PRIVATE arrow::xxhash)
883
+ endforeach ()
877
884
878
885
if (ARROW_USE_XSIMD)
879
886
foreach (ARROW_COMPUTE_CORE_TARGET ${ARROW_COMPUTE_CORE_TARGETS} )
@@ -1167,6 +1174,7 @@ if(ARROW_BUILD_STATIC AND WIN32)
1167
1174
endif ()
1168
1175
1169
1176
foreach (LIB_TARGET ${ARROW_LIBRARIES} )
1177
+ target_link_libraries (${LIB_TARGET} PRIVATE arrow::xxhash)
1170
1178
target_compile_definitions (${LIB_TARGET} PRIVATE ARROW_EXPORTING)
1171
1179
# C++17 is required to compile against Arrow C++ headers and libraries
1172
1180
target_compile_features (${LIB_TARGET} PUBLIC cxx_std_17)
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ add_arrow_lib(arrow_substrait
67
67
${SUBSTRAIT_INCLUDES} )
68
68
69
69
foreach (LIB_TARGET ${ARROW_SUBSTRAIT_LIBRARIES} )
70
+ target_link_libraries (${LIB_TARGET} PRIVATE arrow::xxhash)
70
71
target_compile_definitions (${LIB_TARGET} PRIVATE ARROW_ENGINE_EXPORTING)
71
72
endforeach ()
72
73
Original file line number Diff line number Diff line change 38
38
set (IO_UTIL_TEST_SOURCES io_util_test.cc)
39
39
endif ()
40
40
41
- set (ARROW_UTILITY_TEST_LINK_LIBS Boost::headers)
41
+ set (ARROW_UTILITY_TEST_LINK_LIBS Boost::headers arrow::xxhash )
42
42
if (ARROW_USE_XSIMD)
43
43
list (APPEND ARROW_UTILITY_TEST_LINK_LIBS ${ARROW_XSIMD} )
44
44
endif ()
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ add_arrow_lib(gandiva
174
174
LLVM::LLVM_LIBS)
175
175
176
176
foreach (LIB_TARGET ${GANDIVA_LIBRARIES} )
177
+ target_link_libraries (${LIB_TARGET} PRIVATE arrow::xxhash)
177
178
target_compile_definitions (${LIB_TARGET} PRIVATE GANDIVA_EXPORTING)
178
179
endforeach ()
179
180
Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ add_arrow_lib(parquet
309
309
if (WIN32 AND NOT (ARROW_TEST_LINKAGE STREQUAL "static" ))
310
310
add_library (parquet_test_support STATIC
311
311
"${PARQUET_THRIFT_SOURCE_DIR} /parquet_types.cpp" )
312
- target_link_libraries (parquet_test_support thrift::thrift)
312
+ target_link_libraries (parquet_test_support PRIVATE thrift::thrift)
313
313
list (PREPEND PARQUET_TEST_LINK_LIBS parquet_test_support)
314
314
list (APPEND PARQUET_LIBRARIES parquet_test_support)
315
315
endif ()
@@ -339,8 +339,9 @@ endif()
339
339
add_definitions (-DPARQUET_THRIFT_VERSION_MAJOR=${Thrift_VERSION_MAJOR} )
340
340
add_definitions (-DPARQUET_THRIFT_VERSION_MINOR=${Thrift_VERSION_MINOR} )
341
341
342
- # Thrift requires these definitions for some types that we use
343
342
foreach (LIB_TARGET ${PARQUET_LIBRARIES} )
343
+ target_link_libraries (${LIB_TARGET} PRIVATE arrow::xxhash)
344
+ # Thrift requires these definitions for some types that we use
344
345
target_compile_definitions (${LIB_TARGET}
345
346
PRIVATE PARQUET_EXPORTING
346
347
PRIVATE HAVE_INTTYPES_H
You can’t perform that action at this time.
0 commit comments