Re: [PATCH] cmake: stop FetchContent from fetching content
On Wed, 2022-02-09 at 09:45 -0800, Khem Raj via lists.openembedded.org
wrote:
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
wrote:
On 2/9/22 4:53 AM, Ross Burton wrote:CMake's default is to allow downloads.CMake includes a FetchContent module, which will download furtherwhat is cmake's default ? I think it could become a constant source
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.
of pain if it is not default. Since many cmake based packages might
start to depend on it indirectly in future.
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