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


Eero Aaltonen
 

On Wed, 2022-02-09 at 09:45 -0800, Khem Raj via lists.openembedded.org
wrote:
On 2/9/22 4:53 AM, Ross Burton wrote:
CMake includes a FetchContent module, which will download further
source code at configure time. With the network isolation this
will now fail, but as not all environments support network
isolation we can tell cmake to not download either for extra
safety.
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
patching.


Eero

Join openembedded-core@lists.openembedded.org to automatically receive all group messages.