Skip to content

Commit 571780b

Browse files
committed
ARROW-17494: [C++] Fix adding substrait if missing when linking tests
1 parent eb935d9 commit 571780b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎cpp/src/arrow/engine/CMakeLists.txt‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ foreach(LIB_TARGET ${ARROW_SUBSTRAIT_LIBRARIES})
5858
target_compile_definitions(${LIB_TARGET} PRIVATE ARROW_ENGINE_EXPORTING)
5959
endforeach()
6060

61-
set(ARROW_SUBSTRAIT_TEST_LINK_LIBS ${ARROW_SUBSTRAIT_LINK_lIBS} ${ARROW_TEST_LINK_LIBS})
61+
if (NOT ARROW_SUBSTRAIT_LINK_LIBS)
62+
set(ARROW_SUBSTRAIT_LINK_LIBS substrait)
63+
endif()
64+
65+
set(ARROW_SUBSTRAIT_TEST_LINK_LIBS ${ARROW_SUBSTRAIT_LINK_LIBS} ${ARROW_TEST_LINK_LIBS})
6266
if(ARROW_TEST_LINKAGE STREQUAL "static")
63-
if(NOT arrow_substrait_static)
64-
list(APPEND ARROW_SUBSTRAIT_TEST_LINK_LIBS substrait)
65-
else()
66-
list(APPEND ARROW_SUBSTRAIT_TEST_LINK_LIBS arrow_substrait_static)
67-
endif()
67+
list(APPEND ARROW_SUBSTRAIT_TEST_LINK_LIBS arrow_substrait_static)
6868
else()
6969
list(APPEND ARROW_SUBSTRAIT_TEST_LINK_LIBS arrow_substrait_shared)
7070
endif()

0 commit comments

Comments
 (0)