libdice/tests/CMakeLists.txt
Florian Stinglmayr 13ae614ef6 fix build
2025-05-20 13:29:41 +02:00

22 lines
447 B
CMake

CMAKE_MINIMUM_REQUIRED(VERSION 3.24)
PROJECT(libdice)
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} "m")
ADD_TEST(NAME "${TEST}" COMMAND ${TEST})
ENDFOREACH()