summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/CMakeLists.txt
blob: c8007a0e1d481881eccc76eb5bc1d26a73fecc12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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()