LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
523 stars 131 forks source link

FindKLU.cmake: Avoid detecting MSVC libraries when targeting MinGW #476

Closed mmuetzel closed 6 months ago

mmuetzel commented 6 months ago

For MinGW, setting the library prefix is not necessary and setting the library suffix to d.lib is incorrect. The static library suffix is .a for MinGW.

Prepending those values to the list of library prefixes and suffixes might not actually cause an issue if no libraries are found that match those patterns. But slight ABI differences between MSVC and MinGW could lead to unexpected behavior when mixing binaries of both targets.

This was already discussed in https://github.com/LLNL/sundials/pull/407#discussion_r1481939567. But apparently that change got lost in one of the rebases in that PR.