Moved cmake config for tests to tests/.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
tastytea 2019-06-10 17:28:52 +02:00
parent bbac2b7c51
commit 4922f79bf2
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ endif()
# Compile tests
if(WITH_TESTS)
configure_file("tests/test.gif" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY)
include(tests.CMakeLists.txt)
add_subdirectory(tests)
endif()
# Install library and header files

View File

@ -1,10 +1,10 @@
include(CTest)
file(GLOB sources_tests tests/test_*.cpp tests/*/test_*.cpp)
file(GLOB sources_tests test_*.cpp */test_*.cpp)
find_package(Catch2)
if(Catch2_FOUND) # Catch 2.x
include(Catch)
add_executable(all_tests tests/main.cpp ${sources_tests})
add_executable(all_tests main.cpp ${sources_tests})
target_link_libraries(all_tests ${PROJECT_NAME} Catch2::Catch2)
target_include_directories(all_tests PRIVATE "/usr/include/catch2")
catch_discover_tests(all_tests EXTRA_ARGS "${EXTRA_TEST_ARGS}")