From e8f9c0292bef84f7a5848abab61c2acec0c4527d Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 11 Jul 2020 12:26:35 +0200 Subject: [PATCH] Handle the case where GTest is not found --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f17f66a5..cf7a4d56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -453,6 +453,8 @@ if(TESTS) # Add aliases so target names are compatible with the find_package above add_library(GTest::GTest ALIAS gtest) add_library(GTest::Main ALIAS gtest_main) + else() + message(FATAL_ERROR "Could not find gtest, cannot enable testing") endif() # Hippomocks library