From 8c8052aa7b072e5902cd8254a3b63d2f959032d0 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Tue, 19 Oct 2021 11:31:32 +0300 Subject: [PATCH] GoogleTest.cmake.in: immediately error-out after failure message, Closes #1255 Results in a bit nicer output when googletest was not found. --- cmake/GoogleTest.cmake.in | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/GoogleTest.cmake.in b/cmake/GoogleTest.cmake.in index fd957ff5..99e27fab 100644 --- a/cmake/GoogleTest.cmake.in +++ b/cmake/GoogleTest.cmake.in @@ -32,6 +32,7 @@ if(EXISTS "${GOOGLETEST_PATH}" AND IS_DIRECTORY "${GOOGLETEST_PATH}" else() if(NOT ALLOW_DOWNLOADING_GOOGLETEST) message(SEND_ERROR "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable BENCHMARK_DOWNLOAD_DEPENDENCIES, or disable BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.") + return() else() message(WARNING "Did not find Google Test sources! Fetching from web...") ExternalProject_Add(