Closed LaplaceSoda closed 1 month ago
Macros are not passed into the dependencies: see
However, you can define dependency-based macros for stdlib like for any other dependency. The only caveat is that you will have to use a git-based formulation at this stage, because the stdlib metapackage does not implement external library finding yet:
[dependencies]
stdlib = { git="https://github.com/fortran-lang/stdlib", branch="stdlib-fpm", preprocess.cpp.macros= ["STDLIB_EXTERNAL_BLAS", "STDLIB_EXTERNAL_LAPACK"] }
@LaplaceSoda do you think we should close this issue?
OK,thank you very much.
Description
If we create a new project via fpm and then add following codes in
fpm.toml
to supportopenblas
:Then add a flag in subroutine
stdlib_dgemm
instdlib_linalg_blas_d.F90
to show if thestdlib_dgemm
is calledAnd call
gemm
in main program:Launch the program via
fpm run
, and the result will show that thedgemm
inopenblas
is not called while thestdlib_dgemm
in stdlib is called.If we build directly via compiler flags
fpm build --flag "-DSTDLIB_EXTERNAL_BLAS -DSTDLIB_EXTERNAL_LAPACK -lopenblas"
, the result will show that thedgemm
inopenblas
is correctly called.Expected Behaviour
preprocess macros works normally
Version of fpm
0.10.1, alpha
Platform and Architecture
Windows
Additional Information
No response