Skip to content

Commit 737c5ac

Browse files
committed
Upgrade RE2C downloaded version
This upgrades re2c to 4.0.2 when downloading from upstream as part of the build. Also, in new re2c 4.x releases, the Python3_VERSION does not need to be set anymore (fixed upstream).
1 parent fca8df6 commit 737c5ac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cmake/cmake/modules/FindRE2C.cmake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,14 @@ if(RE2C_ENABLE_DOWNLOAD AND (NOT RE2C_EXECUTABLE OR NOT _re2c_version_valid))
140140
include(FetchContent)
141141

142142
# Set the re2c version to download.
143-
set(RE2C_VERSION 3.1)
143+
set(RE2C_VERSION 4.0.2)
144144

145145
# Configure re2c.
146146
set(RE2C_BUILD_RE2GO OFF CACHE INTERNAL "")
147147
set(RE2C_BUILD_RE2RUST OFF CACHE INTERNAL "")
148148

149-
# Disable searching for Python as it is not needed in FetchContent build.
149+
# Disable searching for Python as it is not needed in this build.
150150
set(CMAKE_DISABLE_FIND_PACKAGE_Python3 TRUE)
151-
set(Python3_VERSION 3.12)
152151

153152
set(FETCHCONTENT_QUIET FALSE)
154153

@@ -157,15 +156,14 @@ if(RE2C_ENABLE_DOWNLOAD AND (NOT RE2C_EXECUTABLE OR NOT _re2c_version_valid))
157156
URL https://github.com/skvadrik/re2c/archive/refs/tags/${RE2C_VERSION}.tar.gz
158157
)
159158

160-
message(STATUS "Downloading RE2C")
159+
message(STATUS "Downloading RE2C ${RE2C_VERSION}")
161160
FetchContent_MakeAvailable(RE2C)
162161

163162
# Set executable to re2c target name.
164163
set(RE2C_EXECUTABLE re2c)
165164

166165
# Unset temporary variables.
167166
unset(CMAKE_DISABLE_FIND_PACKAGE_Python3)
168-
unset(Python3_VERSION)
169167
unset(FETCHCONTENT_QUIET)
170168
endif()
171169

0 commit comments

Comments
 (0)