From 3fde0fc906dcf0c83b3b0b28a3a3fc8a6f2a70b2 Mon Sep 17 00:00:00 2001
From: Tim Kaune <tim.kaune@gmx.de>
Date: Mon, 23 Sep 2024 09:53:55 +0200
Subject: [PATCH] Add the new LAPACK v3.11.0 interface coming with MacOS 15
 Sequoia

---
 CMakeLists.txt |  9 ++++++---
 README.md      | 12 ++++++++++--
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff30a55..9303abe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@ set(CMAKE_MAXIMUM_SUPPORTED_VERSION 3.29)
 
 include("./cmake/HandlePolicies.cmake" NO_POLICY_SCOPE)
 
-project(AccelerateLAPACKE VERSION 1.0.0 LANGUAGES C)
+project(AccelerateLAPACKE VERSION 1.1.0 LANGUAGES C)
 
 include(FetchContent)
 
@@ -40,8 +40,11 @@ if (NOT IS_TOP_LEVEL)
 endif ()
 
 if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
-     # Mac OS X 13.3 Ventura
-    if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 22.4)
+    # Mac OS X 15.0 Sequoia
+    if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 24.0)
+        set(ACCELERATE_NEW_LAPACK_VERSION 3.11.0)
+    # Mac OS X 13.3 Ventura
+    elseif (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 22.4)
         set(ACCELERATE_NEW_LAPACK_VERSION 3.9.1)
     else ()
         message(FATAL_ERROR "You need at least Mac OS X 13.3 Ventura for Accelerate with BLAS/LAPACK v3.9.1!")
diff --git a/README.md b/README.md
index b509127..79ceee2 100644
--- a/README.md
+++ b/README.md
@@ -25,16 +25,24 @@ SOFTWARE.
 
 # Accelerate LAPACKE #
 
-Since Mac OS X 13.3 Ventura, Apple's Accelerate framework comes with a new
+Since MacOS 13.3 Ventura, Apple's Accelerate framework comes with a new
 [BLAS/LAPACK
 interface](https://developer.apple.com/documentation/accelerate/blas) compatible
 with [Reference LAPACK
-v3.9.1](https://github.com/Reference-LAPACK/lapack/tree/v3.9.1). It also
+v3.9.1](https://github.com/Reference-LAPACK/lapack/releases/tag/v3.9.1). It also
 provides an ILP64 interface. On Apple Silicon M-processors, it utilises the
 [proprietary AMX co-processor](https://github.com/corsix/amx), which makes it
 especially interesting. Unfortunately, it comes without the LAPACKE C-interface
 library.
 
+**Update**: With the release of MacOS 15.0 Sequoia, Apple updated the Accelerate
+framework to be compatible with [Reference LAPACK
+v3.11.0](https://github.com/Reference-LAPACK/lapack/releases/tag/v3.11.0).
+Unfortunately, there is no mention of it in the [MacOS 15.0 Sequoia Release
+Notes](), but the note in the [Accelerate BLAS
+docs](https://developer.apple.com/documentation/accelerate/blas) has been
+updated accordingly.
+
 These new interfaces are hidden behind the preprocessor defines
 `ACCELERATE_NEW_LAPACK` and `ACCELERATE_LAPACK_ILP64` and they only work, if you
 include the Accelerate C/C++ headers.
-- 
GitLab