Skip to content

Commit 39de905

Browse files
committed
Accelerate framework on MacOS
1 parent d198042 commit 39de905

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/meta.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,6 @@ jobs:
227227
brew install netcdf
228228
brew install netcdf-fortran
229229
230-
- name: (macOS) Install homebrew OpenBLAS
231-
if: contains(matrix.os,'macos')
232-
run: |
233-
brew install openblas
234-
235230
# Phase 1: Bootstrap fpm with existing version
236231
- name: Install fpm
237232
uses: fortran-lang/setup-fpm@v5

src/metapackage/fpm_meta_blas.f90

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module fpm_meta_blas
22
use fpm_compiler, only: compiler_t, get_include_flag
3+
use fpm_environment, only: get_os_type, OS_MACOS
34
use fpm_meta_base, only: metapackage_t, destroy
45
use fpm_meta_util, only: add_pkg_config_compile_options
56
use fpm_pkg_config, only: assert_pkg_config, pkgcfg_has_package
@@ -34,6 +35,14 @@ subroutine init_blas(this, compiler, error)
3435
this%flags = string_t("")
3536
this%has_external_modules = .false.
3637

38+
if (get_os_type() == OS_MACOS) then
39+
this%flags = string_t("-framework Accelerate")
40+
this%has_build_flags = .true.
41+
this%link_flags = string_t("-framework Accelerate")
42+
this%has_link_flags = .true.
43+
return
44+
end if
45+
3746
if (compiler%is_intel()) then
3847
this%flags = string_t("-qmkl")
3948
this%has_build_flags = .true.

0 commit comments

Comments
 (0)