From e2966ca1564017ff586522c1ea3b390ee501e633 Mon Sep 17 00:00:00 2001 From: gaschler Date: Wed, 11 Apr 2018 13:48:03 +0200 Subject: [PATCH] Do not install gmock (#1047) Fixes the issue described in https://github.com/googlecartographer/cartographer/pull/1041. The docker file is not to be merged, it is only here to help reproducing the issue and fix. --- cmake/modules/FindGMock.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/FindGMock.cmake b/cmake/modules/FindGMock.cmake index 3d2cd9d..c663e98 100644 --- a/cmake/modules/FindGMock.cmake +++ b/cmake/modules/FindGMock.cmake @@ -54,7 +54,8 @@ if(NOT GMock_FOUND) if(GMOCK_SRC_DIR) # If src version found, build it. if(NOT TARGET gmock) - add_subdirectory(${GMOCK_SRC_DIR} "${CMAKE_CURRENT_BINARY_DIR}/gmock") + add_subdirectory(${GMOCK_SRC_DIR} "${CMAKE_CURRENT_BINARY_DIR}/gmock" + EXCLUDE_FROM_ALL) endif() # The next line is needed for Ubuntu Trusty. set(GMOCK_INCLUDE_DIRS "${GMOCK_SRC_DIR}/gtest/include")