diff --git a/scripts/install_KLU_Sundials.py b/scripts/install_KLU_Sundials.py index 0bbdcc3ce6..2b9d268bac 100755 --- a/scripts/install_KLU_Sundials.py +++ b/scripts/install_KLU_Sundials.py @@ -323,8 +323,12 @@ def parallel_download(urls, download_dir): # Build in parallel wherever possible os.environ["CMAKE_BUILD_PARALLEL_LEVEL"] = str(cpu_count()) -# Set macOS environment variables for compatibility -os.environ["MACOSX_DEPLOYMENT_TARGET"] = "11.0" +# Set macOS environment variables for compatibility. this is set to +# 1. 11.1 for arm64 (libcasadi.dylib), and +# 2. 11.0 for x86_64 (libomp.dylib) +os.environ["MACOSX_DEPLOYMENT_TARGET"] = ( + "11.1" if platform.machine == "arm64" else "11.0" +) # Create download directory in PyBaMM dir pybamm_dir = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0]