sc3dev/cmake/testing.cmake

14 lines
303 B
CMake

### TESTS ###
set(TEST_SOURCES) # common test source code
macro(generate_test name)
add_executable(test_${name} test_${name}.cc ${TEST_SOURCES} ${ARGN})
target_link_libraries(${name} ${PROJECT_NAME})
add_test(${name} ${name})
endmacro()
### ADD TESTS HERE ###
generate_test(${PROJECT_NAME}_test)