Improve error message when googletest is missing.

This commit is contained in:
Feng Xiao 2018-04-02 14:28:25 -07:00
parent 7bf47a6b5d
commit 8f88a507ee

View File

@ -1,5 +1,10 @@
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/../third_party/googletest/CMakeLists.txt")
message(FATAL_ERROR "Cannot find third_party/googletest directory.")
message(FATAL_ERROR
"Cannot find third_party/googletest directory that's needed to "
"build tests. If you use git, make sure you have cloned submodules:\n"
" git submodule update --init --recursive\n"
"If instead you want to skip tests, run cmake with:\n"
" cmake -Dprotobuf_BUILD_TESTS=OFF\n")
endif()
option(protobuf_ABSOLUTE_TEST_PLUGIN_PATH