Skip to content

Rewrite FindSuiteSparse to provide imported targets

Simon Praetorius requested to merge feature/find_suitesparse into master

Summary

This MR adds imported-targets to the FindSuiteSparse.cmake module, following modern cmake guidelines.

Details

Instead of exporting include directories and libraries as variables, the find modules exports an imported target that contains all the necessary information to include and link SuiteSparse libraries. The module allows to search for various SuiteSparse components, like UMFPACK or SPQR, and introduces an imported target for each of them in the form: SuiteSparse::<component>. Additionally the combined imported target SuiteSparse::SuiteSparse is defined to link against all found components.

Difference to old FindSuiteSparse module: It searches for all possible components and creates corresponding component targets. The collective target SuiteSparse::SuiteSparse then only contains the requested components.

Edited by Simon Praetorius

Merge request reports

Loading