memilio icon indicating copy to clipboard operation
memilio copied to clipboard

Use FetchContent_MakeAvailable instead of FetchContent_Populate?

Open lenaploetzke opened this issue 9 months ago • 0 comments

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

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

lenaploetzke avatar May 08 '24 08:05 lenaploetzke