diff --git a/tests.CMakeLists.txt b/tests.CMakeLists.txt index 5e4fde4..f38d65e 100644 --- a/tests.CMakeLists.txt +++ b/tests.CMakeLists.txt @@ -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)