From 169d3bb6a51569d36895eb46067687a5d7e7f7f5 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Fri, 13 May 2022 12:10:35 -0700 Subject: [PATCH] disable regs --- cmake/FindANTLR3.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/FindANTLR3.cmake b/cmake/FindANTLR3.cmake index 6b62534e076..a357ca90966 100644 --- a/cmake/FindANTLR3.cmake +++ b/cmake/FindANTLR3.cmake @@ -105,7 +105,11 @@ if(NOT ANTLR3_FOUND_SYSTEM) set(compilers "") if (CMAKE_CROSSCOMPILING_MACOS) - set(compilers "CC=${CMAKE_C_COMPILER} -arch ${CMAKE_OSX_ARCHITECTURES}" "CXX=${CMAKE_CXX_COMPILER} -arch ${CMAKE_OSX_ARCHITECTURES}") + # We set the CC and CXX flags as suggested in + # https://github.com/antlr/antlr3/blob/5c2a916a10139cdb5c7c8851ee592ed9c3b3d4ff/runtime/C/INSTALL#L133-L135. + set(compilers + "CC=${CMAKE_C_COMPILER} -arch ${CMAKE_OSX_ARCHITECTURES}" + "CXX=${CMAKE_CXX_COMPILER} -arch ${CMAKE_OSX_ARCHITECTURES}") endif() # Download, build and install antlr3 runtime