Skip to content
Snippets Groups Projects

Handle optional dependency SuiteSparse by directly passing HAVE_xxx flags

Merged Simon Praetorius requested to merge feature/have-suitesparse-flags into master
1 unresolved thread

Summary

This MR tries to solve an issue with localized config.h files as introduces in !1262 (merged) in the handling of optional dependencies. For a package that is found in an upstream module, like dune-common, but that is used for the first time in a downstream module, we cannot fix the flags HAVE_SUITESPARSE already in upstream. It might be that a user installs SuiteSparse later. This was no problem in the old handling of config.h files when everything is regenerated downstreams, but we want to generate local config.h files in the modules that provide the flags. For purely optional packages, the solution is to introduce the HAVE_SUITESPARSE flag directly downstream and not with the indirection of an ENABLE_SUITESPARSE flag.

Necessary changes for module authors

Nothing! everything is changed in the add_dune_suitesparse_flags macro and the dune_register_package_flags call. Those are executed in downstream modules as before.

This MR acts as a preprint for changes in other modules that also want to provide purely optional packages that are not used by the module itself, but only by downstream modules. Note that protected headers that are not compiled in a library are still fine to be provided in the upstream module.

Closes #252 (closed)

Edited by Simon Praetorius

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 18 18 set(HAVE_SUITESPARSE ${SuiteSparse_FOUND})
    19 19 set(HAVE_UMFPACK ${SuiteSparse_UMFPACK_FOUND})
    20 20
    21 # collect all components that are found
    22 set(SuiteSparse_FOUND_COMPONENTS)
    23 foreach(_component ${SUITESPARSE_COMPONENTS})
    24 if(SuiteSparse_${_component}_FOUND)
    25 list(APPEND SuiteSparse_FOUND_COMPONENTS ${_component})
    26 endif()
    27 endforeach(_component)
    28
    29
    21 30 # register all SuiteSparse related flags
    22 31 if(SuiteSparse_FOUND)
    32 # set(HAVE_SUITESPARSE_FLAGS "HAVE_SUITESPARSE=1")
  • Simon Praetorius changed title from Draft: Hanel optional dependency SuiteSparse by directly passing HAVE_xxx flags to Draft: Handle optional dependency SuiteSparse by directly passing HAVE_xxx flags

    changed title from Draft: Hanel optional dependency SuiteSparse by directly passing HAVE_xxx flags to Draft: Handle optional dependency SuiteSparse by directly passing HAVE_xxx flags

  • Simon Praetorius mentioned in merge request !1262 (merged)

    mentioned in merge request !1262 (merged)

  • Simon Praetorius
  • Simon Praetorius changed the description

    changed the description

  • Looks good to me. If we merge this before 2.10, the we can revert the find_package(SuiteSparse) move from dune-istl to dune-common.

  • mentioned in merge request !1298 (merged)

  • Simon Praetorius resolved all threads

    resolved all threads

  • Simon Praetorius added 20 commits

    added 20 commits

    • cd26adc1...6b70be95 - 18 commits from branch master
    • 70048909 - Hanel optional dependency SuiteSparse by directly passing HAVE_xxx flags
    • 6f80815d - Cleanup the implementation based on review comments

    Compare with previous version

  • Simon Praetorius marked this merge request as ready

    marked this merge request as ready

  • Santiago Ospina De Los Ríos approved this merge request

    approved this merge request

  • added 1 commit

    • 49f4f384 - Hanel optional dependency SuiteSparse by directly passing HAVE_xxx flags

    Compare with previous version

  • Simon Praetorius enabled an automatic merge when the pipeline for 49f4f384 succeeds

    enabled an automatic merge when the pipeline for 49f4f384 succeeds

  • Simon Praetorius mentioned in commit 3846e46a

    mentioned in commit 3846e46a

  • Simon Praetorius mentioned in merge request !1308 (merged)

    mentioned in merge request !1308 (merged)

  • Simon Praetorius mentioned in merge request !1309 (merged)

    mentioned in merge request !1309 (merged)

  • Simon Praetorius mentioned in merge request !1310 (merged)

    mentioned in merge request !1310 (merged)

  • mentioned in merge request !1268 (closed)

  • mentioned in merge request !1252 (closed)

  • Simon Praetorius mentioned in merge request !1434 (merged)

    mentioned in merge request !1434 (merged)

  • Please register or sign in to reply
    Loading