Update re2c to v4.6

This commit is contained in:
Clifford Yapp
2026-09-09 09:50:17 -04:00
parent c8f3497730
commit 4fca55f381
4 changed files with 25 additions and 36 deletions
-1
View File
@@ -22,7 +22,6 @@
[submodule "re2c/re2c"] [submodule "re2c/re2c"]
path = re2c/re2c path = re2c/re2c
url = https://github.com/BRL-CAD/re2c url = https://github.com/BRL-CAD/re2c
branch = RELEASE
ignore = dirty ignore = dirty
shallow = true shallow = true
[submodule "perplex/perplex"] [submodule "perplex/perplex"]
+11
View File
@@ -20,6 +20,17 @@ if (ENABLE_RE2C)
-DRE2C_BUILD_RE2GO=OFF -DRE2C_BUILD_RE2GO=OFF
-DRE2C_BUILD_RE2RUST=OFF -DRE2C_BUILD_RE2RUST=OFF
-DRE2C_REBUILD_DOCS=OFF -DRE2C_REBUILD_DOCS=OFF
-DRE2C_BUILD_RE2D=OFF
-DRE2C_BUILD_RE2GO=OFF
-DRE2C_BUILD_RE2HS=OFF
-DRE2C_BUILD_RE2JAVA=OFF
-DRE2C_BUILD_RE2JS=OFF
-DRE2C_BUILD_RE2OCAML=OFF
-DRE2C_BUILD_RE2PY=OFF
-DRE2C_BUILD_RE2RUST=OFF
-DRE2C_BUILD_RE2SWIFT=OFF
-DRE2C_BUILD_RE2V=OFF
-DRE2C_BUILD_RE2ZIG=OFF
-DBIN_DIR=${BIN_DIR} -DBIN_DIR=${BIN_DIR}
-DLIB_DIR=${LIB_DIR} -DLIB_DIR=${LIB_DIR}
-DDATA_DIR=${DATA_DIR} -DDATA_DIR=${DATA_DIR}
+13 -34
View File
@@ -1,28 +1,7 @@
diff -Naur re2c/CMakeLists.txt RE2C_BLD/CMakeLists.txt diff -Naur re2c/CMakeLists.txt RE2C_BLD/CMakeLists.txt
--- re2c/CMakeLists.txt 2023-09-18 13:54:03.771615948 -0400 --- re2c/CMakeLists.txt 2026-09-09 09:36:54.036421014 -0400
+++ RE2C_BLD/CMakeLists.txt 2023-09-18 17:06:59.078943914 -0400 +++ RE2C_BLD/CMakeLists.txt 2026-09-09 09:39:52.866054493 -0400
@@ -33,11 +33,7 @@ @@ -137,7 +138,6 @@
option(RE2C_REGEN_BENCHMARKS "Regenerate C code for benchmarks" OFF)
# checks for programs
-find_package(Python3 COMPONENTS Interpreter)
-# starting from cmake 3.19 find_package can do version check, but we are on 3.12
-if(Python3_VERSION VERSION_LESS 3.7)
- message(FATAL_ERROR "python version 3.7 or higher is required")
-endif()
+if (Python3_EXECUTABLE)
if(RE2C_REBUILD_DOCS)
execute_process(
COMMAND "${Python3_EXECUTABLE}" -c "import docutils"
@@ -48,6 +44,7 @@
message(FATAL_ERROR "python package docutils (needed for docs) not found")
endif()
endif()
+endif (Python3_EXECUTABLE)
# Use C++11 standard. Note that without `set(CMAKE_CXX_EXTENSIONS OFF)` this enables
# -std=gnu++11, not -std=c++11. Extensions are needed to enable POSIX functions on
@@ -86,7 +83,6 @@
set(top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}") set(top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
set(top_builddir "${CMAKE_CURRENT_BINARY_DIR}") set(top_builddir "${CMAKE_CURRENT_BINARY_DIR}")
@@ -30,28 +9,28 @@ diff -Naur re2c/CMakeLists.txt RE2C_BLD/CMakeLists.txt
configure_file(doc/manpage.rst.in doc/manpage.rst @ONLY) configure_file(doc/manpage.rst.in doc/manpage.rst @ONLY)
configure_file(doc/help.rst.in doc/help.rst @ONLY) configure_file(doc/help.rst.in doc/help.rst @ONLY)
@@ -347,6 +343,7 @@ @@ -486,6 +486,7 @@
)
if(RE2C_BUILD_TESTS)
# tests # tests
+ if (Python3_EXECUTABLE) + if (Python3_EXECUTABLE)
add_custom_target(tests add_custom_target(tests
DEPENDS "${RE2C_RUN_TESTS}" DEPENDS "${RE2C_RUN_TESTS}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
@@ -397,6 +394,7 @@ @@ -539,6 +540,7 @@
re2c_test_ver_to_vernum re2c_test_ver_to_vernum
re2c_test_argsubst re2c_test_argsubst
) )
+ endif (Python3_EXECUTABLE) + endif (Python3_EXECUTABLE)
endif() endif()
if (RE2C_BUILD_LIBS) if (RE2C_BUILD_LIBS)
@@ -532,6 +530,8 @@ @@ -678,6 +680,8 @@
endif()
# only add check target if toplevel project if(RE2C_BUILD_TESTS)
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + if (Python3_EXECUTABLE)
+ if (Python3_EXECUTABLE)
add_custom_target(check) add_custom_target(check)
add_dependencies(check check_re2c check_libre2c) add_dependencies(check check_re2c check_libre2c)
+ endif (Python3_EXECUTABLE) + endif()
endif() endif()