diff options
author | Abseil Team <absl-team@google.com> | 2020-02-28 12:18:28 -0800 |
---|---|---|
committer | CJ Johnson <johnsoncj@google.com> | 2020-02-28 16:01:26 -0500 |
commit | bcefbdcdf6ad85046ccacee0aeffba5404d3e528 (patch) | |
tree | 01a235f9ef9691a34f583d955d2dbb174dba611c /CMake | |
parent | 0033c9ea91a52ade7c6b725aa2ef3cbe15463421 (diff) |
Export of internal Abseil changes
--
09c1e7877210fe85c43631538303af801c233e89 by Gennadiy Rozental <rogeeff@google.com>:
Change CordRep::length to size_t to be compatible with ChunkIterator.
PiperOrigin-RevId: 297901255
--
226d5e79fb4e20fb09d75f034624d5be770f4ece by Derek Mauro <dmauro@google.com>:
Makes absl::string_view::substr constexpr for std::string_view compatibility
Fixes #627
PiperOrigin-RevId: 297872778
--
851aa24a22d0ba5552098bf7e5735c95e4a8d4f7 by Abseil Team <absl-team@google.com>:
Reformat one line.
PiperOrigin-RevId: 297839574
--
4f449c462583797455375fa6f1365a6b2cfa7e0a by Benjamin Barenblat <bbaren@google.com>:
Internal change
PiperOrigin-RevId: 297677173
--
2d41a250e9a8f272946bc3262463e4025d88fba3 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 297537076
--
6e7fbe1e90999a58556d41955bef44033c61876c by Gennadiy Rozental <rogeeff@google.com>:
Internal change
PiperOrigin-RevId: 297376994
--
5acf79338191b31cec158b06cd96ca8dfa3e81fe by Derek Mauro <dmauro@google.com>:
Add a debug-mode bounds-check on absl::Span::operator[].
PiperOrigin-RevId: 297355826
--
1c540d06a56c7e92bb07b90f16b4e00b014ef18f by CJ Johnson <johnsoncj@google.com>:
Adding new LTS to the list
PiperOrigin-RevId: 297235265
--
696ce48bea6927436ff89f59b887e5869b1b0f38 by Derek Mauro <dmauro@google.com>:
Fix build on FreeBSD/powerpc (implement UnscaledCycleClock)
Merges/Fixes GitHub #616
PiperOrigin-RevId: 297188640
GitOrigin-RevId: 09c1e7877210fe85c43631538303af801c233e89
Change-Id: I5d97b16bb6378792d2fcf7d29080cca18aa7729a
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/Googletest/CMakeLists.txt.in | 33 | ||||
-rw-r--r-- | CMake/Googletest/DownloadGTest.cmake | 15 |
2 files changed, 30 insertions, 18 deletions
diff --git a/CMake/Googletest/CMakeLists.txt.in b/CMake/Googletest/CMakeLists.txt.in index d60a33e9..994dac0b 100644 --- a/CMake/Googletest/CMakeLists.txt.in +++ b/CMake/Googletest/CMakeLists.txt.in @@ -1,15 +1,26 @@ cmake_minimum_required(VERSION 2.8.2) -project(googletest-download NONE) +project(googletest-external NONE) include(ExternalProject) -ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG master - SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src" - BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -)
\ No newline at end of file +if(${ABSL_USE_GOOGLETEST_HEAD}) + ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG master + SOURCE_DIR "${absl_gtest_src_dir}" + BINARY_DIR "${absl_gtest_build_dir}" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" + ) +else() + ExternalProject_Add(googletest + SOURCE_DIR "${absl_gtest_src_dir}" + BINARY_DIR "${absl_gtest_build_dir}" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" + ) +endif()
\ No newline at end of file diff --git a/CMake/Googletest/DownloadGTest.cmake b/CMake/Googletest/DownloadGTest.cmake index 8a00b455..6552e1da 100644 --- a/CMake/Googletest/DownloadGTest.cmake +++ b/CMake/Googletest/DownloadGTest.cmake @@ -1,10 +1,11 @@ -# Downloads and unpacks googletest at configure time. Based on the instructions -# at https://github.com/google/googletest/tree/master/googletest#incorporating-into-an-existing-cmake-project +# Integrates googletest at configure time. Based on the instructions at +# https://github.com/google/googletest/tree/master/googletest#incorporating-into-an-existing-cmake-project -# Download the latest googletest from Github master +# Set up the external googletest project, downloading the latest from Github +# master if requested. configure_file( ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in - ${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt + ${CMAKE_BINARY_DIR}/googletest-external/CMakeLists.txt ) set(ABSL_SAVE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) @@ -14,17 +15,17 @@ if (BUILD_SHARED_LIBS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_CREATE_SHARED_LIBRARY=1") endif() -# Configure and build the downloaded googletest source +# Configure and build the googletest source. execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download ) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-external ) if(result) message(FATAL_ERROR "CMake step for googletest failed: ${result}") endif() execute_process(COMMAND ${CMAKE_COMMAND} --build . RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-external) if(result) message(FATAL_ERROR "Build step for googletest failed: ${result}") endif() |