From 57dbafaff841b5c439c38f594095836cda15c371 Mon Sep 17 00:00:00 2001 From: Adrien Bertrand Date: Sun, 25 Aug 2024 19:30:09 +0200 Subject: [PATCH] cmake: make torture tests work everywhere --- libticables/trunk/tests/CMakeLists.txt | 4 +--- libticalcs/trunk/tests/CMakeLists.txt | 4 +--- libticonv/trunk/tests/CMakeLists.txt | 4 +--- libtifiles/trunk/tests/CMakeLists.txt | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/libticables/trunk/tests/CMakeLists.txt b/libticables/trunk/tests/CMakeLists.txt index 5f938f98..7c66e733 100644 --- a/libticables/trunk/tests/CMakeLists.txt +++ b/libticables/trunk/tests/CMakeLists.txt @@ -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 "$" DEPENDS torture_ticables COMMENT "Run the ticables2 torture tests" EXCLUDE_FROM_ALL diff --git a/libticalcs/trunk/tests/CMakeLists.txt b/libticalcs/trunk/tests/CMakeLists.txt index 8a0613c3..9f467382 100644 --- a/libticalcs/trunk/tests/CMakeLists.txt +++ b/libticalcs/trunk/tests/CMakeLists.txt @@ -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 "$" DEPENDS torture_ticalcs COMMENT "Run the ticalcs2 torture tests" EXCLUDE_FROM_ALL diff --git a/libticonv/trunk/tests/CMakeLists.txt b/libticonv/trunk/tests/CMakeLists.txt index ebeace9e..066ba424 100644 --- a/libticonv/trunk/tests/CMakeLists.txt +++ b/libticonv/trunk/tests/CMakeLists.txt @@ -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 "$" DEPENDS torture_ticonv COMMENT "Run the ticonv torture tests" EXCLUDE_FROM_ALL diff --git a/libtifiles/trunk/tests/CMakeLists.txt b/libtifiles/trunk/tests/CMakeLists.txt index 3e930804..891095bd 100644 --- a/libtifiles/trunk/tests/CMakeLists.txt +++ b/libtifiles/trunk/tests/CMakeLists.txt @@ -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 "$" DEPENDS torture_tifiles COMMENT "Run the tifiles2 torture tests" EXCLUDE_FROM_ALL