diff --git a/CMakeLists.txt b/CMakeLists.txt index 666e0f0..838cb66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,9 @@ IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) ADD_LIBRARY(SDL2pp SHARED ${LIBRARY_SOURCES}) TARGET_LINK_LIBRARIES(SDL2pp ${SDL2_LIBRARY}) - # demos + # demos and tests ADD_SUBDIRECTORY(demos) + ADD_SUBDIRECTORY(tests) ELSE(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) MESSAGE(STATUS "libSDL2pp bundled build") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..65ace6b --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,17 @@ +# header tests: these just include specific headers to check if +# they are compilable (e.g., includes and forward declarations are +# complete and do not require extra includes) +SET(HEADER_TESTS + hdr_exception + hdr_point + hdr_rect + hdr_renderer + hdr_sdl + hdr_sdl2pp + hdr_texture + hdr_window +) + +FOREACH(TEST ${HEADER_TESTS}) + ADD_EXECUTABLE(${TEST} ${TEST}.cc) +ENDFOREACH(TEST ${TESTS}) diff --git a/tests/hdr_exception.cc b/tests/hdr_exception.cc new file mode 100644 index 0000000..8b21093 --- /dev/null +++ b/tests/hdr_exception.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +} diff --git a/tests/hdr_point.cc b/tests/hdr_point.cc new file mode 100644 index 0000000..462bd14 --- /dev/null +++ b/tests/hdr_point.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +} diff --git a/tests/hdr_rect.cc b/tests/hdr_rect.cc new file mode 100644 index 0000000..5e45731 --- /dev/null +++ b/tests/hdr_rect.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +} diff --git a/tests/hdr_renderer.cc b/tests/hdr_renderer.cc new file mode 100644 index 0000000..8ace592 --- /dev/null +++ b/tests/hdr_renderer.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +} diff --git a/tests/hdr_sdl.cc b/tests/hdr_sdl.cc new file mode 100644 index 0000000..7b4f35d --- /dev/null +++ b/tests/hdr_sdl.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +} diff --git a/tests/hdr_sdl2pp.cc b/tests/hdr_sdl2pp.cc new file mode 100644 index 0000000..07e8341 --- /dev/null +++ b/tests/hdr_sdl2pp.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +} diff --git a/tests/hdr_texture.cc b/tests/hdr_texture.cc new file mode 100644 index 0000000..a5b1573 --- /dev/null +++ b/tests/hdr_texture.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +} diff --git a/tests/hdr_window.cc b/tests/hdr_window.cc new file mode 100644 index 0000000..cda49ba --- /dev/null +++ b/tests/hdr_window.cc @@ -0,0 +1,5 @@ +#include + +int main() { + return 0; +}