samurai
samurai copied to clipboard
build: proper link to PETSc library with absolute path
- [x] I have installed pre-commit locally and use it to validate my commits.
- [x] The PR title follows the conventional commits convention. Available tags: 'build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test'
- [x] This new PR is documented.
- [x] This new PR is tested.
Description
When using pkg_search_module
to find PETSc, it populates (at least) two variables: PETSC_LIBRARIES
that contains only the name of the library (ie petsc
) and PETSC_LINK_LIBRARIES
that contains the absolute path to the library.
Until this fix, only PETSC_LIBRARIES
was used that leads to linkage error for some configurations, eg when PETSc is not installed system-wide but only through a package manager like in a conda environment.
Using PETSC_LINK_LIBRARIES
instead fix this issue.
How has this been tested?
Compiling and launching affected targets.
Code of Conduct
By submitting this PR, you agree to follow our Code of Conduct
- [x] I agree to follow this project's Code of Conduct