From 8f88a507ee416837371f90ff074b87a8a135c6e9 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 2 Apr 2018 14:28:25 -0700 Subject: Improve error message when googletest is missing. --- cmake/tests.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/tests.cmake b/cmake/tests.cmake index d7522759..ec790e33 100644 --- a/cmake/tests.cmake +++ b/cmake/tests.cmake @@ -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 -- cgit v1.2.3