diff options
author | Tamas Kenez <tamas.kenez@gmail.com> | 2023-12-01 23:09:45 +0100 |
---|---|---|
committer | Tamas Kenez <tamas.kenez@gmail.com> | 2023-12-01 23:09:53 +0100 |
commit | 48b373f6e0019cc766b4e088201fc90fe1373fe2 (patch) | |
tree | 2c50de32cdd92df3d102482be816b2e042e1828f /CMakeLists.txt | |
parent | 76bb2afb8b522d24496ad1c757a49784fbfa2e42 (diff) | |
download | googletest-48b373f6e0019cc766b4e088201fc90fe1373fe2.zip googletest-48b373f6e0019cc766b4e088201fc90fe1373fe2.tar.gz googletest-48b373f6e0019cc766b4e088201fc90fe1373fe2.tar.bz2 |
Allow using external absl and re2.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 24d41c2..9e6d644 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,15 @@ option(BUILD_GMOCK "Builds the googlemock subproject" ON) option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF) +if(GTEST_HAS_ABSL) + if(NOT TARGET absl::base) + find_package(absl REQUIRED) + endif() + if(NOT TARGET re2::re2) + find_package(re2 REQUIRED) + endif() +endif() + if(BUILD_GMOCK) add_subdirectory( googlemock ) else() |