Skip to content

BuildPDAF: use FindLAPACK result variables for linking#131

Open
jjokella wants to merge 3 commits into
masterfrom
dev-lapack-lib-pdaf
Open

BuildPDAF: use FindLAPACK result variables for linking#131
jjokella wants to merge 3 commits into
masterfrom
dev-lapack-lib-pdaf

Conversation

@jjokella
Copy link
Copy Markdown
Contributor

@jjokella jjokella commented Jun 3, 2026

Summary

  • Replaces manually constructed MKL linking flags in BuildPDAF.cmake with the standard LAPACK_LIBRARIES and LAPACK_LINKER_FLAGS variables populated by CMake's FindLAPACK module
  • Removes compiler-ID branches (Intel/IntelLLVM/GNU) that mapped to different -qmkl/-mkl flags and hardcoded MKL .so paths
  • Adds STATUS messages for LAPACK_LIBRARIES and LAPACK_LINKER_FLAGS to aid debugging

Motivation

The previous approach hardcoded MKL library filenames and used compiler-specific flags, which was fragile and only partially portable (GNU path fell back to LAPACK_LIBRARIES with a WARNING, Intel path ignored it entirely). Since find_package(LAPACK REQUIRED) was already being called, using its output variables directly is the correct and portable approach.

Using

- `LAPACK_LIBRARIES`
- `LAPACK_LINKER_FLAGS`

should make the interface more robust for future compiler changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant