Skip to content

Use FetchContent_MakeAvailable instead of FetchContent_Populate? #1027

Open
@lenaploetzke

Description

@lenaploetzke

Motivation / Current Behaviour

Currently we use the structure

FetchContent_GetProperties(eigen)
if(NOT eigen_POPULATED)
   FetchContent_Populate(eigen)
endif()

for most dependencies. In some cases, it might be possible to use FetchContent_MakeAvailable() which is recommended (see also
https://cmake.org/cmake/help/latest/module/FetchContent.html) instead of using FetchContent_GetProperties() and FetchContent_Populate() directly.

Enhancement description

Use FetchContent_MakeAvailable() instead of FetchContent_GetProperties() and FetchContent_Populate(). We may need to set the option OVERRIDE_FIND_PACKAGE or similar to prevent the search for local versions.

We could also discuss whether we want to allow searching for local versions and only downloading otherwise (and not controlling this via the MEMILIO_USE_BUNDLED_ options). This could speed up the build especially because of downloading boost.

Additional context

No response

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Assignees

No one assigned

    Labels

    class::discussionUsed for discussions on software and model .loc::backendThis issue concerns the C++ backend implementation.prio::lowThe priority of this task is low. It is an interesting item but with low priority.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions