2015-04-28 21:54:03 +02:00
|
|
|
set(SRCROOT "${PROJECT_SOURCE_DIR}/test/src")
|
|
|
|
|
|
|
|
SET(SRC
|
|
|
|
"${SRCROOT}/Main.cpp"
|
2018-08-14 22:56:34 +02:00
|
|
|
"${SRCROOT}/UnitTests.hpp"
|
2015-04-28 21:37:01 +02:00
|
|
|
"${SRCROOT}/UnitTests.cpp"
|
2015-04-28 21:54:03 +02:00
|
|
|
"${SRCROOT}/Vector2.cpp"
|
2015-04-27 21:07:19 -07:00
|
|
|
"${SRCROOT}/Rect.cpp"
|
2015-04-28 21:54:03 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/include")
|
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/extlibs/headers")
|
|
|
|
|
|
|
|
# Using sfmltest instead of test because the latter is reserved.
|
|
|
|
add_executable(sfmltest ${SRC})
|
|
|
|
|
|
|
|
target_link_libraries(sfmltest sfml-graphics sfml-window sfml-audio sfml-network sfml-system)
|
|
|
|
|
|
|
|
add_custom_target(runtests ALL
|
|
|
|
DEPENDS sfmltest
|
|
|
|
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/test"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E echo "Running test suite..."
|
|
|
|
COMMAND sfmltest
|
|
|
|
)
|