libdice/tests/CMakeLists.txt

21 lines
425 B
CMake
Raw Normal View History

2019-08-19 21:28:04 +02:00
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
SET(TESTS
"test_dice_evaluate"
"test_dice_fudge"
"test_dice_parse"
"test_dice_simple_roll"
"test_expr_parse"
)
INCLUDE_DIRECTORIES(
"${CMAKE_CURRENT_SOURCE_DIR}/../lib/"
${CMOCKA_INCLUDE_DIRS}
)
FOREACH(TEST ${TESTS})
ADD_EXECUTABLE(${TEST} ${TEST}.c)
TARGET_LINK_LIBRARIES(${TEST} dice ${CMOCKA_LIBRARIES})
ADD_TEST(NAME "${TEST}" COMMAND ${TEST})
ENDFOREACH()