aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-04-02 14:28:25 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2018-04-02 14:28:25 -0700
commit8f88a507ee416837371f90ff074b87a8a135c6e9 (patch)
treed81ff9282301b03ec0a9530a6e4b91e6a059134d /cmake
parent7bf47a6b5d10382a4b427677cf7ca9288f4e2833 (diff)
downloadprotobuf-8f88a507ee416837371f90ff074b87a8a135c6e9.tar.gz
protobuf-8f88a507ee416837371f90ff074b87a8a135c6e9.tar.bz2
protobuf-8f88a507ee416837371f90ff074b87a8a135c6e9.zip
Improve error message when googletest is missing.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/tests.cmake7
1 files changed, 6 insertions, 1 deletions
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