easybuild-easyblocks icon indicating copy to clipboard operation
easybuild-easyblocks copied to clipboard

CMakeMake easyblock: Suggestion to set -DFETCHCONTENT_FULLY_DISCONNECTED=ON by default

Open ThomasHoffmann77 opened this issue 7 months ago • 4 comments

Probably, please open an issue about it so we have it on record.

Originally posted by @akesandgren in https://github.com/easybuilders/easybuild-easyconfigs/pull/22155#discussion_r2128246582

ThomasHoffmann77 avatar Jun 05 '25 08:06 ThomasHoffmann77

Can you share some more context/info in this issue itself? What would this imply, why should we do it, etc.?

boegel avatar Jun 18 '25 07:06 boegel

Can you share some more context/info in this issue itself? What would this imply, why should we do it, etc.?

Many cmake-base software packages download third-party packages at build time by fetch_content(). Such sources are not tracked by default. E.g. libcifpp downloads catch2 and other for which also a builddepenceny could be used. Setting FETCHCONTENT_FULLY_DISCONNECTED=ON by default would help to enforce using such packeges by (build)dependencies. Some existing easyconfigs might fail with this default setting. However, dependencies could be adapted accordingly.

Therefore offline-builds could be improved with this new default parameter.

ThomasHoffmann77 avatar Jun 18 '25 08:06 ThomasHoffmann77

We can download required sources and use FETCHCONTENT_SOURCE_DIR_FOO to point CMake to it: https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_SOURCE_DIR_%3CuppercaseName%3E

So this shouldn't be causing too much trouble

Flamefire avatar Jun 18 '25 09:06 Flamefire

just some bike shedding:

offline = ...

to determine this (which is used by cargo* easyblocks already)

Micket avatar Jun 18 '25 09:06 Micket