diff --git a/pkgs/development/tools/parsing/antlr/4.10.runtime.cpp.cmake.patch b/pkgs/development/tools/parsing/antlr/4.10.runtime.cpp.cmake.patch new file mode 100644 index 000000000000..9dcb2aeb7833 --- /dev/null +++ b/pkgs/development/tools/parsing/antlr/4.10.runtime.cpp.cmake.patch @@ -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") diff --git a/pkgs/development/tools/parsing/antlr/4.nix b/pkgs/development/tools/parsing/antlr/4.nix index 02fd86abde21..a3519c641534 100644 --- a/pkgs/development/tools/parsing/antlr/4.nix +++ b/pkgs/development/tools/parsing/antlr/4.nix @@ -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 =