stuff-from-scratch/test/CMakeLists.txt

36 lines
1 KiB
CMake
Raw Normal View History

2022-11-30 18:28:50 +00:00
add_subdirectory(test_utils)
2022-12-01 10:52:48 +00:00
file(COPY data/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_data)
2022-11-30 18:28:50 +00:00
set(TEST_MODULES
audio
compiler
compression
core
database
fonts
graphics
image
ipc
network
publishing
video
web
windows)
foreach(module ${TEST_MODULES})
add_subdirectory(${module})
string(TOUPPER ${module} MODULE_UPPER)
list(APPEND UNIT_TEST_FILES ${${MODULE_UPPER}_UNIT_TEST_FILES})
list(APPEND UNIT_TEST_DEPENDENCIES ${${MODULE_UPPER}_UNIT_TEST_DEPENDENCIES})
2022-12-01 10:52:48 +00:00
list(APPEND INTEGRATION_TEST_FILES ${${MODULE_UPPER}_INTEGRATION_TEST_FILES})
list(APPEND INTEGRATION_TEST_DEPENDENCIES ${${MODULE_UPPER}_INTEGRATION_TEST_DEPENDENCIES})
2022-11-30 18:28:50 +00:00
endforeach()
add_executable(unit_tests test_runner.cpp ${UNIT_TEST_FILES})
target_link_libraries(unit_tests PUBLIC test_utils ${UNIT_TEST_DEPENDENCIES})
2022-12-01 10:52:48 +00:00
add_executable(integration_tests test_runner.cpp ${INTEGRATION_TEST_FILES})
target_link_libraries(integration_tests PUBLIC test_utils ${INTEGRATION_TEST_DEPENDENCIES})