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

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

parents 3472e4ab a5eca3e3
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(AccelerateLAPACKE VERSION 1.5.0 LANGUAGES C)
project(AccelerateLAPACKE VERSION 1.6.0 LANGUAGES C Fortran)
include(FetchContent)
......@@ -44,9 +44,9 @@ message(STATUS "Trying to link to ILP64 interface of LAPACK: ${BUILD_NEW_LAPACK}
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 FALSE)
......
......
......@@ -91,7 +91,7 @@ Analyzing the resulting `.dylib` with `otool`, you can see:
```shell
$ otool -L ./build/32/_deps/reference-lapack-build/lib/liblapacke.dylib
./build/32/_deps/reference-lapack-build/lib/liblapacke.dylib:
@rpath/liblapacke.3.dylib (compatibility version 3.0.0, current version 3.11.0)
@rpath/liblapacke.3.dylib (compatibility version 3.0.0, current version 3.12.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
```
......
......
#[[
MIT License
CMake build script for the Accelerate LAPACKE project
Copyright (c) 2025 Tim Kaune
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
]]
# Macro to parse the symbol names from the .tbd files
# Provides the `${_LIB_NAME}_SYMBOLS` list variable.
macro (parse_tbd_symbols _LIB_NAME _TBD_PATH)
file(READ "${_TBD_PATH}" _TBD_CONTENT)
# First, match all symbol arrays in the .tbd file
string(REGEX MATCHALL "symbols:[\r\n\t ]+\\[[\r\n\t ][^]]*[\r\n\t ]\\]" _TBD_SYMBOL_ARRAY_MATCHES "${_TBD_CONTENT}")
set("${_LIB_NAME}_SYMBOLS" "")
foreach (_SYMBOL_ARRAY_MATCH IN LISTS _TBD_SYMBOL_ARRAY_MATCHES)
# Extract the array contents from the symbol array match
string(REGEX MATCH "\\[[\r\n\t ]([^]]*)[\r\n\t ]\\]" _DUMMY_MATCH "${_SYMBOL_ARRAY_MATCH}")
# Replace commas and white space with semi colons
string(REGEX REPLACE ",[\r\n\t ]*" ";" _SYMBOLS_IN_ARRAY "${CMAKE_MATCH_1}")
# Remove single quotes around the symbols containing $ signs
string(REPLACE "'" "" _SYMBOLS_IN_ARRAY "${_SYMBOLS_IN_ARRAY}")
list(APPEND "${_LIB_NAME}_SYMBOLS" ${_SYMBOLS_IN_ARRAY})
endforeach ()
endmacro ()
# Macro to filter the full list for $NEWLAPACK symbols
# Provides the `${_LIB_NAME}_NEWLAPACK_SYMBOLS` list variable.
macro (filter_new_lapack_symbols _LIB_NAME)
set("${_LIB_NAME}_NEWLAPACK_SYMBOLS" ${${_LIB_NAME}_SYMBOLS})
list(FILTER "${_LIB_NAME}_NEWLAPACK_SYMBOLS" INCLUDE REGEX "\\$NEWLAPACK$")
endmacro ()
# Macro to filter the full list for $NEWLAPACK$ILP64 symbols
# Provides the `${_LIB_NAME}_NEWLAPACK_ILP64_SYMBOLS` list variable.
macro (filter_new_lapack_ilp64_symbols _LIB_NAME)
set("${_LIB_NAME}_NEWLAPACK_ILP64_SYMBOLS" ${${_LIB_NAME}_SYMBOLS})
list(FILTER "${_LIB_NAME}_NEWLAPACK_ILP64_SYMBOLS" INCLUDE REGEX "\\$NEWLAPACK\\$ILP64$")
endmacro ()
# Macro to build the aliases from the filtered symbol lists
# For a symbols list variable ending in `_SYMBOLS`, provides the corresponding
# `_ALIASES` string variable.
macro (build_aliases _SYMBOL_LIST_VAR_NAME)
string(REPLACE "_SYMBOLS" "_ALIASES" _ALIASES_VAR_NAME "${_SYMBOL_LIST_VAR_NAME}")
# Transform the symbols `_<symbol>$NEWLAPACK($ILP64)` to aliases
# `_<symbol>$NEWLAPACK($ILP64) _<symbol>_`
list(TRANSFORM ${_SYMBOL_LIST_VAR_NAME} REPLACE "^([^\\$]+)\\$.+$" "\\0\t\\1_" OUTPUT_VARIABLE ${_ALIASES_VAR_NAME})
# Join the list with line breaks
list(JOIN ${_ALIASES_VAR_NAME} "\n" ${_ALIASES_VAR_NAME})
endmacro ()
/*
* MIT License
*
* CMake build script for the Accelerate LAPACKE project
* Copyright (c) 2025 Tim Kaune
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <stdio.h>
extern void ilaver_(long int* major, long int* minor, long int* patch);
int main()
{
long int major, minor, patch;
ilaver_(&major, &minor, &patch);
printf("LAPACK v%ld.%ld.%ld", major, minor, patch);
return 0;
}
/*
* MIT License
*
* CMake build script for the Accelerate LAPACKE project
* Copyright (c) 2025 Tim Kaune
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <stdio.h>
extern void ilaver_(int* major, int* minor, int* patch);
int main()
{
int major, minor, patch;
ilaver_(&major, &minor, &patch);
printf("LAPACK v%d.%d.%d", major, minor, patch);
return 0;
}
# BLAS
@BLAS_NEWLAPACK_ILP64_ALIASES@
# BLAS
@BLAS_NEWLAPACK_ALIASES@
# LAPACK
@LAPACK_NEWLAPACK_ILP64_ALIASES@
# LAPACK
@LAPACK_NEWLAPACK_ALIASES@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment