@@ -58,6 +58,27 @@ if(BUILD_absl)
5858 message (CHECK_PASS "fetched" )
5959endif ()
6060
61+ # ##############################################################################
62+ # RE2
63+ # ##############################################################################
64+ if (BUILD_re2)
65+ message (CHECK_START "Fetching re2" )
66+ list (APPEND CMAKE_MESSAGE_INDENT " " )
67+ FetchContent_Declare(
68+ re2
69+ GIT_REPOSITORY "https://github.com/google/re2.git"
70+ GIT_TAG "2025-08-12"
71+ GIT_SHALLOW TRUE
72+ UPDATE_COMMAND git reset --hard
73+ PATCH_COMMAND git apply --ignore -whitespace
74+ "${CMAKE_CURRENT_LIST_DIR} /../../patches/re2-2025-08-12.patch"
75+ )
76+ set (RE2_BUILD_TESTING OFF )
77+ FetchContent_MakeAvailable(re2)
78+ list (POP_BACK CMAKE_MESSAGE_INDENT)
79+ message (CHECK_PASS "fetched" )
80+ endif ()
81+
6182# ##############################################################################
6283# Protobuf
6384# ##############################################################################
@@ -84,27 +105,6 @@ if(BUILD_Protobuf)
84105 message (CHECK_PASS "fetched" )
85106endif ()
86107
87- # ##############################################################################
88- # RE2
89- # ##############################################################################
90- if (BUILD_re2)
91- message (CHECK_START "Fetching re2" )
92- list (APPEND CMAKE_MESSAGE_INDENT " " )
93- FetchContent_Declare(
94- re2
95- GIT_REPOSITORY "https://github.com/google/re2.git"
96- GIT_TAG "2025-08-12"
97- GIT_SHALLOW TRUE
98- UPDATE_COMMAND git reset --hard
99- PATCH_COMMAND git apply --ignore -whitespace
100- "${CMAKE_CURRENT_LIST_DIR} /../../patches/re2-2025-08-12.patch"
101- )
102- set (RE2_BUILD_TESTING OFF )
103- FetchContent_MakeAvailable(re2)
104- list (POP_BACK CMAKE_MESSAGE_INDENT)
105- message (CHECK_PASS "fetched" )
106- endif ()
107-
108108###############
109109## TESTING ##
110110###############
0 commit comments