Skip to content

Commit f791ad0

Browse files
committed
cmake: fixup tests build for old CMake
This patch is a follow-up to the commit 1e5887d ("FFI: Avoid dangling cts->L."). The `target_link_options()` feature is introduced in CMake 3.13. Unfortunately, we have distros in Tarantool's CI with an older default CMake version. This patch workarounds this by the passing `LINK_FLAGS` directly. Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Signed-off-by: Sergey Kaplun <skaplun@tarantool.org> (cherry picked from commit 5f8bab2)
1 parent bb42640 commit f791ad0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/tarantool-c-tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ foreach(test_source ${tests})
5656
)
5757
set_target_properties(${exe} PROPERTIES
5858
COMPILE_FLAGS "${TESTS_C_FLAGS}"
59+
# Allow to call non-static functions via FFI.
60+
LINK_FLAGS "-rdynamic"
5961
OUTPUT_NAME "${exe}${C_TEST_SUFFIX}"
6062
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
6163
)
62-
# Allow to call non-static functions via FFI.
63-
target_link_options(${exe} PRIVATE "-rdynamic")
6464
target_link_libraries(${exe} libtest ${LUAJIT_LIBRARY})
6565
add_dependencies(tarantool-c-tests-build ${exe})
6666

0 commit comments

Comments
 (0)