File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ option(BUILD_GMOCK "Builds the googlemock subproject" ON)
20
20
option (INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON )
21
21
option (GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF )
22
22
23
+ if (GTEST_HAS_ABSL )
24
+ if (NOT TARGET absl::base )
25
+ find_package (absl REQUIRED )
26
+ endif ()
27
+ if (NOT TARGET re2::re2 )
28
+ find_package (re2 REQUIRED )
29
+ endif ()
30
+ endif ()
31
+
23
32
if (BUILD_GMOCK )
24
33
add_subdirectory ( googlemock )
25
34
else ()
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ if (@GTEST_HAS_PTHREAD@)
4
4
set (THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@ )
5
5
find_dependency (Threads )
6
6
endif ()
7
+ if (@GTEST_HAS_ABSL@ )
8
+ find_dependency (absl )
9
+ find_dependency (re2 )
10
+ endif ()
7
11
8
12
include (
"${CMAKE_CURRENT_LIST_DIR} /@[email protected] " )
9
13
check_required_components ("@project_name@" )
You can’t perform that action at this time.
0 commit comments