From bcefbdcdf6ad85046ccacee0aeffba5404d3e528 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 28 Feb 2020 12:18:28 -0800 Subject: Export of internal Abseil changes -- 09c1e7877210fe85c43631538303af801c233e89 by Gennadiy Rozental : Change CordRep::length to size_t to be compatible with ChunkIterator. PiperOrigin-RevId: 297901255 -- 226d5e79fb4e20fb09d75f034624d5be770f4ece by Derek Mauro : Makes absl::string_view::substr constexpr for std::string_view compatibility Fixes #627 PiperOrigin-RevId: 297872778 -- 851aa24a22d0ba5552098bf7e5735c95e4a8d4f7 by Abseil Team : Reformat one line. PiperOrigin-RevId: 297839574 -- 4f449c462583797455375fa6f1365a6b2cfa7e0a by Benjamin Barenblat : Internal change PiperOrigin-RevId: 297677173 -- 2d41a250e9a8f272946bc3262463e4025d88fba3 by Abseil Team : Internal change PiperOrigin-RevId: 297537076 -- 6e7fbe1e90999a58556d41955bef44033c61876c by Gennadiy Rozental : Internal change PiperOrigin-RevId: 297376994 -- 5acf79338191b31cec158b06cd96ca8dfa3e81fe by Derek Mauro : Add a debug-mode bounds-check on absl::Span::operator[]. PiperOrigin-RevId: 297355826 -- 1c540d06a56c7e92bb07b90f16b4e00b014ef18f by CJ Johnson : Adding new LTS to the list PiperOrigin-RevId: 297235265 -- 696ce48bea6927436ff89f59b887e5869b1b0f38 by Derek Mauro : Fix build on FreeBSD/powerpc (implement UnscaledCycleClock) Merges/Fixes GitHub #616 PiperOrigin-RevId: 297188640 GitOrigin-RevId: 09c1e7877210fe85c43631538303af801c233e89 Change-Id: I5d97b16bb6378792d2fcf7d29080cca18aa7729a --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fdfb2cfa..74b5cd9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,10 @@ find_package(Threads REQUIRED) option(ABSL_USE_GOOGLETEST_HEAD "If ON, abseil will download HEAD from googletest at config time." OFF) +set(ABSL_LOCAL_GOOGLETEST_DIR "/usr/src/googletest" CACHE PATH + "If ABSL_USE_GOOGLETEST_HEAD is OFF, specifies the directory of a local googletest checkout." + ) + option(ABSL_RUN_TESTS "If ON, Abseil tests will be run." OFF) if(${ABSL_RUN_TESTS}) @@ -96,11 +100,13 @@ endif() ## check targets if(BUILD_TESTING) + set(absl_gtest_build_dir ${CMAKE_BINARY_DIR}/googletest-build) if(${ABSL_USE_GOOGLETEST_HEAD}) - include(CMake/Googletest/DownloadGTest.cmake) set(absl_gtest_src_dir ${CMAKE_BINARY_DIR}/googletest-src) - set(absl_gtest_build_dir ${CMAKE_BINARY_DIR}/googletest-build) + else() + set(absl_gtest_src_dir ${ABSL_LOCAL_GOOGLETEST_DIR}) endif() + include(CMake/Googletest/DownloadGTest.cmake) check_target(gtest) check_target(gtest_main) -- cgit v1.2.3