Skip to content

Commit

Permalink
cmake: make torture tests work everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
adriweb committed Aug 25, 2024
1 parent 34c87e6 commit 57dbafa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions libticables/trunk/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ foreach(tar torture_ticables test_ticables_2)
target_link_libraries(${tar} PRIVATE PkgConfig::glib ticables2_objlib)
endforeach()

set(builddirlibpaths "${PROJECT_BINARY_DIR}")

add_custom_target(ticables2_check
COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH="${builddirlibpaths}" ${CMAKE_CURRENT_BINARY_DIR}/torture_ticables
COMMAND "$<TARGET_FILE:torture_ticables>"
DEPENDS torture_ticables
COMMENT "Run the ticables2 torture tests"
EXCLUDE_FROM_ALL
Expand Down
4 changes: 1 addition & 3 deletions libticalcs/trunk/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ foreach(tar torture_ticalcs test_ticalcs_2)
target_link_libraries(${tar} PRIVATE ticonv_objlib tifiles2_objlib ticables2_objlib ticalcs2_objlib)
endforeach()

set(builddirlibpaths "${PROJECT_BINARY_DIR}/../../../libticonv/trunk:${PROJECT_BINARY_DIR}/../../../libtifiles/trunk:${PROJECT_BINARY_DIR}/../../../libticables/trunk:${PROJECT_BINARY_DIR}/..")

add_custom_target(ticalcs2_check
COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH="${builddirlibpaths}" ${CMAKE_CURRENT_BINARY_DIR}/torture_ticalcs
COMMAND "$<TARGET_FILE:torture_ticalcs>"
DEPENDS torture_ticalcs
COMMENT "Run the ticalcs2 torture tests"
EXCLUDE_FROM_ALL
Expand Down
4 changes: 1 addition & 3 deletions libticonv/trunk/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ foreach(tar torture_ticonv test_ticonv)
target_link_libraries(${tar} PRIVATE PkgConfig::glib ticonv_objlib)
endforeach()

set(builddirlibpaths "${PROJECT_BINARY_DIR}/..")

add_custom_target(ticonv_check
COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH="${builddirlibpaths}" ${CMAKE_CURRENT_BINARY_DIR}/torture_ticonv
COMMAND "$<TARGET_FILE:torture_ticonv>"
DEPENDS torture_ticonv
COMMENT "Run the ticonv torture tests"
EXCLUDE_FROM_ALL
Expand Down
4 changes: 1 addition & 3 deletions libtifiles/trunk/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ foreach(tar torture_tifiles test_tifiles_2)
target_link_libraries(${tar} PRIVATE PkgConfig::glib LibArchive::LibArchive ticonv_objlib tifiles2_objlib)
endforeach()

set(builddirlibpaths "${PROJECT_BINARY_DIR}/../../../libticonv/trunk:${PROJECT_BINARY_DIR}/..")

add_custom_target(tifiles2_check
COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH="${builddirlibpaths}" ${CMAKE_CURRENT_BINARY_DIR}/torture_tifiles
COMMAND "$<TARGET_FILE:torture_tifiles>"
DEPENDS torture_tifiles
COMMENT "Run the tifiles2 torture tests"
EXCLUDE_FROM_ALL
Expand Down

0 comments on commit 57dbafa

Please sign in to comment.