Skip to content

Commit b0a8c9c

Browse files
Fix the meson build.
You will need to meson setup builddir \ -Dlibcblas_path=/PATH/To/LAPACK/CBLAS/include meson compile -C builddir
1 parent d650fc5 commit b0a8c9c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

meson.build

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ if fc.get_id() == 'nagfor'
1919
add_global_arguments('-dcfuns', language : 'fortran')
2020
endif
2121

22+
# Tapenade-generated CBLAS code uses NBDirsMax as the maximum number
23+
# of differentiation directions. Keep this in sync with DIFFSIZESC.inc.
24+
add_global_arguments('-DNBDirsMax=4', language : 'c')
25+
2226
# Options
2327
install_modules = get_option('modules')
2428
libblas_name = get_option('libblas')
@@ -42,7 +46,14 @@ endif
4246

4347
# Headers
4448
libdiffblas_include = include_directories('BLAS/include', 'TAPENADE/include')
45-
libdiffcblas_include = include_directories('CBLAS/src/tmp', 'TAPENADE/include')
49+
libdiffcblas_inc_dirs = ['CBLAS/include', 'TAPENADE/include']
50+
51+
# Allow the user to provide external CBLAS headers (e.g. Lapack's CBLAS/include)
52+
foreach p : libcblas_path
53+
libdiffcblas_inc_dirs += p
54+
endforeach
55+
56+
libdiffcblas_include = include_directories(libdiffcblas_inc_dirs)
4657

4758
# Sources
4859
libdiffblas_src = []

0 commit comments

Comments
 (0)