Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 2d0ed08

Browse files
authored
CMake: use the same version of googletest as bazel. (#434)
1 parent c900c4d commit 2d0ed08

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cmake/OpenCensusDeps.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ include(FetchContent)
1616

1717
FetchContent_Declare(
1818
googletest
19-
GIT_REPOSITORY https://github.com/abseil/googletest
20-
GIT_TAG ed2fe122f8dc9aca844d724986d1d5cf5b65ea4e)
19+
GIT_REPOSITORY https://github.com/google/googletest
20+
GIT_TAG master)
2121
FetchContent_Declare(
2222
abseil
2323
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
@@ -57,8 +57,11 @@ endif()
5757
FetchContent_GetProperties(abseil)
5858
if(NOT abseil_POPULATED)
5959
message(STATUS "Dependency: abseil")
60+
set(orig_BUILD_TESTING "${BUILD_TESTING}")
61+
set(BUILD_TESTING OFF) # Don't include abseil tests.
6062
FetchContent_Populate(abseil)
6163
add_subdirectory(${abseil_SOURCE_DIR} ${abseil_BINARY_DIR} EXCLUDE_FROM_ALL)
64+
set(BUILD_TESTING "${orig_BUILD_TESTING}") # Restore value.
6265
endif()
6366

6467
FetchContent_GetProperties(prometheus)

tools/travis/build_cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -x
1717

1818
ccache -s
1919
ccache -z
20-
cmake -H. -B.build
20+
cmake -H. -B.build -DCMAKE_CXX_FLAGS=-Wno-unused-command-line-argument
2121
cmake --build .build
2222
(cd .build && ctest --output-on-failure)
2323
ccache -s

0 commit comments

Comments
 (0)