GoogleTest.cmake.in: immediately error-out after failure message, Closes #1255

Results in a bit nicer output when googletest was not found.
This commit is contained in:
Roman Lebedev 2021-10-19 11:31:32 +03:00
parent 7fad964a94
commit 8c8052aa7b
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 1 additions and 0 deletions

View File

@ -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(