Matlab Crash: Illegal instruction on M1 Mac

Hi,

I have removed the existing build folder from acados root folder and generated build cmake with GENERIC targets as shown below. But still, it crashes.

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type is Release
-- ACADOS_WITH_OPENMP: OFF
CMake Deprecation Warning at external/blasfeo/CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Using linear algebra: HIGH_PERFORMANCE
-- Using matrix format: PANELMAJ
-- Using external BLAS: 0
-- Testing target GENERIC: assembly compilation [success]
-- Testing target GENERIC: assembly run [success]
-- Testing target GENERIC: intrinsic compilation [success]
-- Testing target GENERIC: intrinsic run [success]
-- Compiling for target: GENERIC
CMake Deprecation Warning at external/hpipm/CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Using BLASFEO path: 
-- Installation directory: /Users/raghuboppana/acados
--  
-- Target: BLASFEO is GENERIC, HPIPM is GENERIC
-- Linear algebra: HIGH_PERFORMANCE
-- Matlab MEX (OFF)
-- Octave MEX (OFF)
-- Octave Templates (OFF)
-- System name:version Darwin:21.6.0
-- Build type is Release
-- Installation directory is /Users/raghuboppana/acados
-- OpenMP parallelization is OFF
--  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/raghuboppana/acados

This is what I set in Cmakelists.txt

if(CMAKE_MAKE_PROGRAM)
    file(TO_CMAKE_PATH ${CMAKE_MAKE_PROGRAM} CMAKE_MAKE_PROGRAM)
    find_program(CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM})
endif()

project(acados LANGUAGES C CXX)

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

### Defaults

set(ACADOS_INSTALL_DIR "${PROJECT_SOURCE_DIR}" CACHE PATH  "Installation path to PROJECT_SOURCE_DIR")
if ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
  set(BLASFEO_TARGET "GENERIC" CACHE STRING "BLASFEO Target architecture")
else()
  set(BLASFEO_TARGET "GENERIC" CACHE STRING "BLASFEO Target architecture")
endif()
set(HPIPM_TARGET "GENERIC" CACHE STRING "HPIPM Target architecture")
set(LA "HIGH_PERFORMANCE" CACHE STRING "Linear algebra optimization level")