Re: [PATCH] cmake: stop FetchContent from fetching content

Ross Burton <ross@...>

On Thu, 10 Feb 2022 at 10:13, Eero Aaltonen <eero.aaltonen@...> wrote:
what is cmake's default ? I think it could become a constant source
of pain if it is not default. Since many cmake based packages might
start to depend on it indirectly in future.
CMake's default is to allow downloads.

It's possible to write CMake projects so that they try find_package
first and then fall back to downloading. I think
FETCHCONTENT_FULLY_DISCONNECTED might be a helpful flag so that the
build can then simply report if a required dependency has the wrong
version or so.

CMake projects that use _only_ FetchContent will likely need heavier
The reasoning for this patch is that with the network isolation change
the FetchContents will fail, but as in some environments the network
isolation doesn't work (eg Docker containers) we can disable
FetchContent explicitly too.

Yes, projects which just use FetchContent are a pain. Lets guess why
I wrote this patch. :)


Join { to automatically receive all group messages.