Skip to contentSkip to conversation

Network Isolation and CMake FetchContent

DISCUSSION Rudolf J Streif 3 participants 4 messages Mar 22, 2023 – Mar 24, 2023

lore
Share & tools
lore
#0 lore raw

I have a vendor project which uses CMake FetchContent.

It's simple to override FETCHCONTENT_FULLY_DISCONNECTED=ON which is set in the cmake class. However, that does not fix the issue since network isolation prevents the CMake from downloading the content.

I have not found a way to override the network isolation. Is there one?

Now this is not a discussion about whether FetchContent or not is a good idea and any potential other issues that could arise from using it. For me it's to quickly enable a functionality without jumping through hoops of patching the vendor sources etc.

Cheers,
Rudi

#1 lore raw

Hi Rudolf,

Rudolf J Streif <[email protected]> escreveu no dia quarta, 22/03/2023 à(s) 16:58:

Quoted 8 lines

I have a vendor project which uses CMake FetchContent.

It's simple to override FETCHCONTENT_FULLY_DISCONNECTED=ON which is set in the cmake class. However, that does not fix the issue since network isolation prevents the CMake from downloading the content.

I have not found a way to override the network isolation. Is there one?

please try in a recipe bbappend with

do_configure[network] = "1"

Jose

Quoted 22 lines

Now this is not a discussion about whether FetchContent or not is a good idea and any potential other issues that could arise from using it. For me it's to quickly enable a functionality without jumping through hoops of patching the vendor sources etc.

Cheers,
Rudi

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#59492):
https://lists.yoctoproject.org/g/yocto/message/59492
Mute This Topic: https://lists.yoctoproject.org/mt/97782979/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Best regards,

José Quaresma
#2 lore raw
Quoted 12 lines · Jose Quaresma

Hi Rudolf,

Rudolf J Streif <[email protected]> escreveu no dia quarta, 22/03/2023 à(s) 16:58:

I have a vendor project which uses CMake FetchContent.

It's simple to override FETCHCONTENT_FULLY_DISCONNECTED=ON which is set
in the cmake class. However, that does not fix the issue since network
isolation prevents the CMake from downloading the content.

Quoted 8 lines

I have not found a way to override the network isolation. Is there one?

please try in a recipe bbappend with

do_configure[network] = "1"

Thank you. That did the trick. I should have known that. It's one of these days...

Quoted 33 lines

Jose

Now this is not a discussion about whether FetchContent or not is a good
idea and any potential other issues that could arise from using it. For
me it's to quickly enable a functionality without jumping through hoops
of patching the vendor sources etc.

Cheers,
Rudi

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#59492):
https://lists.yoctoproject.org/g/yocto/message/59492
Mute This Topic: https://lists.yoctoproject.org/mt/97782979/5052612
Group Owner: [email protected] <mailto:yocto%[email protected]>
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Best regards,

José Quaresma
Signature · 3 lines
Rudolf J Streif
CEO/CTO
1.855.442.3386
#3 lore raw
In reply to Rudolf J Streif
Quoted 9 lines · Rudolf J Streif via lists.yoctoproject.org

I have a vendor project which uses CMake FetchContent.

It's simple to override FETCHCONTENT_FULLY_DISCONNECTED=ON which is set in the cmake class. However, that does not fix the issue since network isolation prevents the CMake from downloading the content.

I have not found a way to override the network isolation. Is there one?

Yes: do_compile[network] = “1”

Ross