Skip to content

[cmake] Only use target_link_libraries on defined SuiteSparse targets.

Some code assumed that all components where found unconditionally which lead to errors like:

-- Found SuiteSparse: /usr/lib64/libsuitesparseconfig.so (found version "4.0.2") found components: CHOLMOD LDL UMFPACK missing components: SPQR
CMake Error at $HOME/dune-common/cmake/modules/FindSuiteSparse.cmake:245 (target_link_libraries):
  Cannot specify link libraries for target "SuiteSparse::SPQR" which is not
  built by this project.
Call Stack (most recent call first):
  cmake/modules/DuneIstlMacros.cmake:16 (find_package)
  $HOME/dune-common/cmake/modules/DuneModuleDependencies.cmake:112 (include)
  $HOME/dune-common/cmake/modules/DuneProject.cmake:123 (dune_process_dependency_macros)
  CMakeLists.txt:27 (dune_project)

-- Configuring incomplete, errors occurred!

Closes #323 (closed)

Merge request reports

Loading