Skip to content
Snippets Groups Projects
Unverified Commit 5b1a99ae authored by Tim Kaune's avatar Tim Kaune
Browse files

Merge branch '1-lapack-v312-in-recent-macos-versions'

parents a328bfb3 e03324df
No related branches found
No related tags found
No related merge requests found
......@@ -23,11 +23,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
]]
set(CMAKE_MAXIMUM_SUPPORTED_VERSION 3.31)
set(CMAKE_MAXIMUM_SUPPORTED_VERSION 4.0)
cmake_minimum_required(VERSION 3.12...${CMAKE_MAXIMUM_SUPPORTED_VERSION})
project(AccelerateLAPACK VERSION 1.4.0 LANGUAGES C)
project(AccelerateLAPACK VERSION 1.5.0 LANGUAGES C)
string(COMPARE EQUAL "${CMAKE_PROJECT_NAME}" "${PROJECT_NAME}" IS_TOP_LEVEL)
......@@ -41,16 +41,22 @@ if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
# The available binary Accelerate version is determined by the MacOS system
message(STATUS "The Darwin kernel version is: ${CMAKE_HOST_SYSTEM_VERSION}")
if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 24.0)
if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 24.5)
# Mac OS X 15.5 Sequoia or later
message(STATUS "The MacOS version is: >=15.5")
set(MINIMUM_MACOS_SDK_VERSION 15.5)
set(ACCELERATE_NEW_LAPACK_VERSION 3.12.0)
elseif (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 24.0)
# Mac OS X 15.0 Sequoia or later
message(STATUS "The MacOS version is: >=15.0")
message(STATUS "The MacOS version is: >=15.0,<15.5")
set(MINIMUM_MACOS_SDK_VERSION 15.0)
set(VALID_MACOS_SDK_VERSIONS 15.4 15.2 15.1 ${MINIMUM_MACOS_SDK_VERSION})
set(ACCELERATE_NEW_LAPACK_VERSION 3.11.0)
elseif (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 22.4)
# Mac OS X 13.3 Ventura or later
message(STATUS "The MacOS version is: >=13.3,<15.0")
set(MINIMUM_MACOS_SDK_VERSION 13.3)
set(VALID_MACOS_SDK_VERSIONS 14.5 14.4 14.2 14.0 13.3)
set(VALID_MACOS_SDK_VERSIONS 14.5 14.4 14.2 14.0 ${MINIMUM_MACOS_SDK_VERSION})
set(ACCELERATE_NEW_LAPACK_VERSION 3.9.1)
else ()
# Before Mac OS X 13.3 Ventura
......
......@@ -38,6 +38,13 @@ Unfortunately, there is no mention of it in the [MacOS 15.0 Sequoia Release
Notes][macos15-release-notes], but the note in the [Accelerate BLAS
docs][accelerate-docs] has been updated accordingly.
**Update2**: With the release of MacOS 15.5 Sequoia, Apple updated the
Accelerate framework to be compatible with [Reference LAPACK
v3.12.0][lapack-v3.12.0]. Unfortunately, there is no mention of it in the [MacOS
15.5 Sequoia Release Notes][macos15.5-release-notes], but the note in the
[Accelerate BLAS docs][accelerate-docs] has been updated accordingly, even
though it erroneously says, v3.12.0 will be supported with MacOS 16.
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.
......@@ -47,7 +54,9 @@ include the Accelerate C/C++ headers.
[lapack-v3.2.1]: https://netlib.org/lapack/#_lapack_version_3_2_1
[lapack-v3.9.1]: https://github.com/Reference-LAPACK/lapack/releases/tag/v3.9.1
[lapack-v3.11.0]: https://github.com/Reference-LAPACK/lapack/releases/tag/v3.11.0
[lapack-v3.12.0]: https://github.com/Reference-LAPACK/lapack/releases/tag/v3.12.0
[macos15-release-notes]: https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes
[macos15.5-release-notes]: https://developer.apple.com/documentation/macos-release-notes/macos-15_5-release-notes
- [The Problem](#the-problem)
- [The Solution](#the-solution)
......@@ -85,7 +94,7 @@ The reason for this is, that the binary symbol provided by the Accelerate
framework is called `_dgeqrt$NEWLAPACK`, literally. This is a symbol, that no
Fortran compiler will probably ever emit voluntarily. So, what to do?
[dgeqrt-ref]: https://github.com/Reference-LAPACK/lapack/blob/v3.11.0/CMakeLists.txt#L365-L366
[dgeqrt-ref]: https://github.com/Reference-LAPACK/lapack/blob/v3.12.0/CMakeLists.txt#L295-L296
## The Solution ##
......@@ -179,9 +188,9 @@ include(FetchContent)
FetchContent_Declare(
AccelerateLAPACK
GIT_REPOSITORY "https://github.com/lepus2589/accelerate-lapack.git"
GIT_TAG v1.4.0
GIT_TAG v1.5.0
SYSTEM
FIND_PACKAGE_ARGS 1.4.0 CONFIG NAMES AccelerateLAPACK
FIND_PACKAGE_ARGS 1.5.0 CONFIG NAMES AccelerateLAPACK
)
set(AccelerateLAPACK_INCLUDE_PACKAGING TRUE)
FetchContent_MakeAvailable(AccelerateLAPACK)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment