summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/CMakeLists.txt
blob: c94278e0b3da9045fec23a2a3e87793cd2e80828 (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 $<TARGET_FILE:ucode> -L $<TARGET_FILE_DIR:fs_lib>/*.so -S run_tests.uc
	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 $<TARGET_FILE:ucode> -L $<TARGET_FILE_DIR:fs_lib>/*.so -S run_tests.uc
		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()