summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/custom/CMakeLists.txt')
-rw-r--r--tests/custom/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/custom/CMakeLists.txt b/tests/custom/CMakeLists.txt
new file mode 100644
index 0000000..c8007a0
--- /dev/null
+++ b/tests/custom/CMakeLists.txt
@@ -0,0 +1,22 @@
+ADD_TEST(
+ NAME custom
+ COMMAND run_tests.sh
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+SET_PROPERTY(TEST custom APPEND PROPERTY ENVIRONMENT
+ "UCODE_BIN=valgrind --quiet --leak-check=full $<TARGET_FILE:ucode>"
+ "UCODE_LIB=${CMAKE_BINARY_DIR}"
+)
+
+IF(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ ADD_TEST(
+ NAME custom-san
+ COMMAND run_tests.sh
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+
+ SET_PROPERTY(TEST custom-san APPEND PROPERTY ENVIRONMENT
+ "UCODE_BIN=$<TARGET_FILE:ucode-san>"
+ "UCODE_LIB=${CMAKE_BINARY_DIR}"
+ )
+ENDIF()