If Catch 2 and Catch 1 is not found, then abort.
the build failed Details

This commit is contained in:
tastytea 2019-01-02 06:31:50 +01:00
parent a72149221a
commit 3faff570a2
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 7 additions and 2 deletions

View File

@ -3,8 +3,13 @@ if(WITH_TESTS)
if(Catch2_FOUND)
set(MYCATCH, Catch2::Catch2)
else()
message(WARNING "Catch2 not found. Assuming Catch 1.x is installed.")
set(MYCATCH, "")
if(EXISTS "/usr/include/catch.hpp")
message(STATUS "Catch 1.x found.")
set(MYCATCH, "")
else()
message(FATAL_ERROR
"Neither Catch 2.x nor Catch 1.x could be found.")
endif()
endif()
include(CTest)