Skip to content

Commit

Permalink
fix: Set TEXTPLAN_SOURCE_DIR based on current dir in ploadloader test.
Browse files Browse the repository at this point in the history
That variable was previously computed based on `CMAKE_SOURCE_DIR`, which
is the wrong value if `substrait-cpp` is used as a dependency from a
different top-level CMake project. The PR applies the pattern based on
`CMAKE_CURRENT_SOURCE_DIR` used in other tests.
  • Loading branch information
ingomueller-net committed Mar 14, 2024
1 parent abad742 commit 907ac64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion export/planloader/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ add_test_case(
gtest
gtest_main)

set(TEXTPLAN_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/substrait/textplan")
cmake_path(GET CMAKE_CURRENT_SOURCE_DIR PARENT_PATH TEXTPLAN_SOURCE_DIR)
cmake_path(GET TEXTPLAN_SOURCE_DIR PARENT_PATH TEXTPLAN_SOURCE_DIR)
cmake_path(GET TEXTPLAN_SOURCE_DIR PARENT_PATH TEXTPLAN_SOURCE_DIR)
set(TEXTPLAN_SOURCE_DIR "${TEXTPLAN_SOURCE_DIR}/src/substrait/textplan")

add_custom_command(
TARGET planloader_test
Expand Down

0 comments on commit 907ac64

Please sign in to comment.