diff options
author | Colin Cross <ccross@android.com> | 2022-01-24 20:27:14 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2022-04-12 12:11:06 -0700 |
commit | 36ccdba805f1322c23714dbeb227fb632b54ae45 (patch) | |
tree | 2ce94d7f0804ccb77d1fa9b2a1bca00eecdff1e2 /third_party/abseil-cpp/CMake/Googletest/DownloadGTest.cmake | |
parent | ebc7d1eda6f23c4fa070f527fa557ba750fa30b0 (diff) | |
download | webrtc-36ccdba805f1322c23714dbeb227fb632b54ae45.tar.gz |
Update webrtc's abseil-cpp
Copy external/abseil-cpp into webrtc to update to version 20211102.0
to pick up changes that fix compiling against musl libc.
Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Test: m checkbuild
Change-Id: I0ab600cd8db93a55eda8358cdbecd21c2f78d8fb
Diffstat (limited to 'third_party/abseil-cpp/CMake/Googletest/DownloadGTest.cmake')
-rw-r--r-- | third_party/abseil-cpp/CMake/Googletest/DownloadGTest.cmake | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/third_party/abseil-cpp/CMake/Googletest/DownloadGTest.cmake b/third_party/abseil-cpp/CMake/Googletest/DownloadGTest.cmake index 8a00b4550c..9d071c9170 100644 --- a/third_party/abseil-cpp/CMake/Googletest/DownloadGTest.cmake +++ b/third_party/abseil-cpp/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() @@ -37,6 +38,4 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) # Add googletest directly to our build. This defines the gtest and gtest_main # targets. -add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src - ${CMAKE_BINARY_DIR}/googletest-build - EXCLUDE_FROM_ALL) +add_subdirectory(${absl_gtest_src_dir} ${absl_gtest_build_dir} EXCLUDE_FROM_ALL) |