Description
Describe the bug
No matter which SuiteSparse modules the users wishe to build, if they don't have a BLAS library installed on their machine, compilation will fail because the suitesparse_config module always looks for this dependency on the system.
Let us be a user who wants to build SuiteSparse with only a few modules. For example, they need only suitesparse_config, AMD, COLAMD, BTF and KLU. Also, they do not need KLU to use CHOLMOD. Therefore,
To Reproduce
- Clone the repo
- Follow the build instructions with these options:
cmake -DSUITESPARSE_ENABLE_PROJECTS="suitesparse_config;amd;colamd;btf;klu" -DKLU_USE_CHOLMOD:BOOL=OFF ..
Expected behavior
I expect the build not to crash due to BLAS being not found since those modules don't need it.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu 24.04
- compiler: gcc 13
- BLAS and LAPACK library, if applicable: NONE
- Version [e.g. 22]
Additional context
In order to make my build work, I currently have to manually patch SuiteSparse_config/CMakeLists.txt
and SuiteSparse_config/SuiteSparse_config.c
to avoid checking for the BLAS dependency.
See powsybl/powsybl-metrix#207 (still a WIP as of 2025/04/08).