antlr4_10.runtime.cpp: fix build

This commit is contained in:
Aaron Jheng
2025-10-14 14:42:11 +08:00
parent 50433c5c8f
commit e6201c941b
2 changed files with 23 additions and 0 deletions
@@ -0,0 +1,20 @@
diff --git a/runtime/Cpp/CMakeLists.txt b/runtime/Cpp/CMakeLists.txt
index 302cd4a78..336a37bf0 100644
--- a/runtime/Cpp/CMakeLists.txt
+++ b/runtime/Cpp/CMakeLists.txt
@@ -30,15 +30,10 @@ project(LIBANTLR4)
if(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
CMAKE_VERSION VERSION_GREATER "3.0.0")
CMAKE_POLICY(SET CMP0026 NEW)
- CMAKE_POLICY(SET CMP0054 OLD)
- CMAKE_POLICY(SET CMP0045 OLD)
- CMAKE_POLICY(SET CMP0042 OLD)
endif()
if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR
CMAKE_VERSION VERSION_GREATER "3.3.0")
- CMAKE_POLICY(SET CMP0059 OLD)
- CMAKE_POLICY(SET CMP0054 OLD)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
@@ -184,6 +184,9 @@ in
(lib.cmakeBool "ANTLR4_INSTALL" true)
(lib.cmakeBool "ANTLR_BUILD_CPP_TESTS" false)
];
extraPatches = [
./4.10.runtime.cpp.cmake.patch
];
}).antlr;
antlr4_9 =