Moved cmake config for tests to tests/.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
bbac2b7c51
commit
4922f79bf2
@ -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
|
||||
|
@ -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}")
|
Reference in New Issue
Block a user