aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2024-02-17 15:35:35 +0200
committerLasse Collin <lasse.collin@tukaani.org>2024-02-19 12:21:37 +0200
commit74e8bc7417a0f37ca7ed5ee0127d33c69b3100b9 (patch)
tree3204107c7e8c43f2c5c2a0597aa812af8d89a71c /CMakeLists.txt
parentCMake: Install scripts. (diff)
downloadxz-74e8bc7417a0f37ca7ed5ee0127d33c69b3100b9.tar.xz
CMake: Add test_scripts.sh to the tests.
In contrast to Automake, skipping of this test when decoders are disabled is handled at CMake side instead of test_scripts.sh because CMake-build doesn't create config.h.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57013fa2..fae52cd1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1803,4 +1803,18 @@ if(BUILD_TESTING)
SKIP_RETURN_CODE 77
)
endforeach()
+
+ if(UNIX AND HAVE_DECODERS)
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_scripts")
+
+ add_test(NAME test_scripts.sh
+ COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_scripts.sh" ".."
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_scripts"
+ )
+
+ set_tests_properties(test_scripts.sh PROPERTIES
+ ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}/tests"
+ SKIP_RETURN_CODE 77
+ )
+ endif()
endif()