aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-07-11 10:43:53 -0700
committerGravatar GitHub <noreply@github.com>2016-07-11 10:43:53 -0700
commit7126163b92c4b6be0ed8f9954e29fd9965cd7bb6 (patch)
tree073422594d1078f618df843dcc62014dbdcac668 /CMakeLists.txt
parent7f7c802072865c2c6da19849480a2ac0c0cf812a (diff)
parenta72712e245ca39d35d67532b0d66cd2dc1959e4d (diff)
Merge pull request #7235 from tberghammer/cmake-protobuf
Remove gmock protobuf dependency from cmake build
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3dcd1eb23d..fb8a199ad5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,13 @@ if(NOT ZLIB_ROOT_DIR)
set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
endif()
+# Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
+# Disable them unless they are explicitly requested from the cmake command line (when we assume
+# gmock is downloaded to the right location inside protobuf).
+if(NOT protobuf_BUILD_TESTS)
+ set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
+endif()
+
add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)