Skip to content

Commit

Permalink
Resolve build system warnings
Browse files Browse the repository at this point in the history
Ensure meson version >=1.1 . Link with native liblapack on Ubuntu 20.04
because of stack overflow issue of `_zgel` with libopenblas64 and liblapack64 ,
as well as write beyond scope issue of SVD decomposition.
Don't call BLAS for matrix-matrix multiplications.
  • Loading branch information
antonysigma committed Nov 13, 2024
1 parent ba25f09 commit 1fd6ce8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
25 changes: 19 additions & 6 deletions 3rdparty/packagefiles/armadillo-code/meson.build
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
project('armadillo', 'cpp',
version: '14.1.x',
version: '14.0.x',
)

# Header-only library
armadillo_inc = include_directories('include')

if get_option('lapack') == 'openblas64'
lapack_dep = dependency('openblas64')
elif get_option('lapack') == 'openblas'
lapack_dep = dependency('openblas')
elif get_option('lapack') == 'lapack64'
lapack_dep = dependency('lapack64')
else # lapack or altas
lapack_dep = dependency('lapack')
endif


armadillo_dep = declare_dependency(
include_directories: armadillo_inc,
compile_args: [
'-DARMA_DONT_USE_BLAS',
'-DARMA_DONT_USE_ARPACK',
],
dependencies: [
dependency('openblas', required: false),
dependency('lapack', required: false),
dependency('arpack2', required: false),
]
)
lapack_dep,
],
)
11 changes: 11 additions & 0 deletions 3rdparty/packagefiles/armadillo-code/meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
option('lapack',
description: 'Choose an implementation of the LAPACK solver',
type: 'combo',
choices: [
'openblas64',
'openblas',
'lapack64',
'lapack',
],
value: 'openblas',
)
2 changes: 1 addition & 1 deletion examples/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_languages('c')
add_languages('c', native: false)

hdf5_dep = dependency('hdf5', language: 'c', required: false)

Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
project('MicroscPSF', 'cpp',
meson_version: '>=1.1',
license: 'MIT',
license_files: [
'LICENSE.txt',
Expand Down

0 comments on commit 1fd6ce8

Please sign in to comment.