test: Run selected noninteractive tests at build-time
In Autotools, these are run by `make -C ${builddir}/test check`.
In CMake, they're run by `make -C ${builddir} test` or
`ninja -C ${builddir} test` or `ctest --test-dir ${builddir}`.
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Sam Lantinga
parent
b299f74d05
commit
7d2808e30b
@@ -2980,6 +2980,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSDL_BUILD_MICRO_VERSION=${SDL_MICRO_VERSIO
|
||||
##### Tests #####
|
||||
|
||||
if(SDL_TEST)
|
||||
include(CTest)
|
||||
include_directories(BEFORE "${SDL2_BINARY_DIR}/include")
|
||||
include_directories(AFTER "${SDL2_SOURCE_DIR}/include")
|
||||
file(GLOB TEST_SOURCES ${SDL2_SOURCE_DIR}/src/test/*.c)
|
||||
|
||||
Reference in New Issue
Block a user