From b8e275b96286b300f5d020de1efd261f39f93656 Mon Sep 17 00:00:00 2001 From: ConnorQi01 <205710829+ConnorQi01@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:55:07 +0800 Subject: [PATCH] GH-55279: [C++] Match compute-testing definitions to test linkage Use selected test linkage instead of static-library availability for Windows API definitions. The original DLPack target link failure reproduces; the patched target passes all 39 tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- cpp/src/arrow/compute/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/compute/CMakeLists.txt b/cpp/src/arrow/compute/CMakeLists.txt index bfddb66358ab..7fd7fb1e7ab7 100644 --- a/cpp/src/arrow/compute/CMakeLists.txt +++ b/cpp/src/arrow/compute/CMakeLists.txt @@ -46,7 +46,7 @@ if(ARROW_TESTING AND ARROW_COMPUTE) target_link_libraries(arrow_compute_testing PUBLIC $ PUBLIC ${ARROW_GTEST_GTEST}) - if(ARROW_BUILD_STATIC AND WIN32) + if(ARROW_TEST_LINKAGE STREQUAL "static" AND WIN32) target_compile_definitions(arrow_compute_testing PUBLIC ARROW_COMPUTE_STATIC ARROW_STATIC) endif()