Skip to content

Commit bfd7e7d

Browse files
committed
testing
1 parent e8df2cd commit bfd7e7d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

cpp/src/arrow/compute/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ if(ARROW_TESTING)
3535
# Even though this is still just an object library we still need to "link" our
3636
# dependencies so that include paths are configured correctly
3737
target_link_libraries(arrow_compute_core_testing PUBLIC ${ARROW_GTEST_GMOCK})
38+
# When using static test linkage, define ARROW_STATIC so test_util_internal.cc doesn't expect DLL imports
39+
if(ARROW_TEST_LINKAGE STREQUAL "static")
40+
target_compile_definitions(arrow_compute_core_testing PRIVATE ARROW_STATIC)
41+
endif()
3842
endif()
3943

4044
# Define arrow_compute_testing object library for test files requiring extra kernels.
@@ -46,6 +50,10 @@ if(ARROW_TESTING AND ARROW_COMPUTE)
4650
target_link_libraries(arrow_compute_testing
4751
PUBLIC $<TARGET_OBJECTS:arrow_compute_core_testing>
4852
PUBLIC ${ARROW_GTEST_GTEST})
53+
# When using static test linkage, define ARROW_STATIC so test_env.cc doesn't expect DLL imports
54+
if(ARROW_TEST_LINKAGE STREQUAL "static")
55+
target_compile_definitions(arrow_compute_testing PRIVATE ARROW_STATIC)
56+
endif()
4957
endif()
5058

5159
set(ARROW_COMPUTE_TEST_PREFIX "arrow-compute")

cpp/src/arrow/compute/kernels/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ if(ARROW_TESTING)
2626
# Even though this is still just an object library we still need to "link" our
2727
# dependencies so that include paths are configured correctly
2828
target_link_libraries(arrow_compute_kernels_testing PUBLIC ${ARROW_GTEST_GMOCK})
29+
# When using static test linkage, define ARROW_STATIC so test_util_internal.cc doesn't expect DLL imports
30+
if(ARROW_TEST_LINKAGE STREQUAL "static")
31+
target_compile_definitions(arrow_compute_kernels_testing PRIVATE ARROW_STATIC)
32+
endif()
2933
endif()
3034

3135
add_arrow_test(scalar_cast_test

0 commit comments

Comments
 (0)