Skip to content

Commit 436dda8

Browse files
committed
use cmake to find MKL and update dependencies
1 parent b767d2d commit 436dda8

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/build-with-clang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Install mkl-service dependencies
5858
run: |
59-
pip install meson-python cython mkl
59+
pip install meson-python cython cmake ninja mkl
6060
pip install ${{ matrix.numpy_version }}
6161
6262
- name: List oneAPI folder content

.github/workflows/build-with-standard-clang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Install mkl-service dependencies
4949
run: |
50-
pip install meson-python cython mkl
50+
pip install meson-python cython cmake ninja mkl
5151
pip install ${{ matrix.numpy_version }}
5252
5353
- name: Build mkl-service

meson.build

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@ c_args = ['-DNDEBUG']
1818
thread_dep = dependency('threads')
1919

2020
cc = meson.get_compiler('c')
21-
mkl_rt = cc.find_library('mkl_rt', required: true)
22-
mkl_dep = declare_dependency(dependencies: [mkl_rt])
21+
mkl_dep = dependency('MKL', method: 'cmake',
22+
modules: ['MKL::MKL'],
23+
cmake_args: [
24+
'-DMKL_ARCH=intel64',
25+
'-DMKL_LINK=sdl',
26+
],
27+
required: true
28+
)
2329

2430
rpath = ''
2531
if host_machine.system() != 'windows'

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ requires = [
2929
"meson-python>=0.13.0",
3030
"ninja",
3131
"Cython",
32-
"mkl-devel"
32+
"mkl-devel",
33+
"cmake"
3334
]
3435

3536
[project]

0 commit comments

Comments
 (0)