aminya / project_options

A general-purpose CMake library that provides functions that improve the CMake experience following the best practices.

Home Page:https://aminya.github.io/project_options/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding an option for not adding the default Conan remotes

fgallegosalido opened this issue · comments

Currently, the conan section forces the addition of both the conan-center-index and bincrafters remotes by default. Even though the comments state that we can remove remotes, I can't figure out how to do it without calling conan through add_custom_command or something like that.

The thing with adding bincrafters by default is that it sometimes complains about some env variables not defined. For that reason, and the fact that not everybody is going to use dependencies from the bincrafters remote, I propose to remove its addition and let the users decide whether they want to add it or not. Maybe a wrapper around conan_add_remote could be added to ease the job for users.

Upvote & Fund

@aminya is using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.

Thank you in advance for helping prioritize & fund our backlog!


Fund with Polar

The current default works for most of the users. We can add an option that skips the addition of the remotes.

Something I forgot to mention is that bincrafters recipes seem to be slowing down quite a bit. This could mean that, once Conan V2 is released, many recipes can stop working all together. As the officially mantained ones are from the Conan Center Index, I would add that remote by default (maybe add an option, but most users use this remote) and just not add the bincrafters at all.

To me the problem is really that it uses a different name that the conan default, so basically it renames conancenter to cci for 99% of users.

conan_add_remote(
NAME
cci
URL
https://center.conan.io
INDEX
0)

This is the conan default:

https://github.com/conan-io/conan/blob/c3fc425871149b12a1d12153bed90a06a3d20132/conans/client/cache/remote_registry.py#L14

CONAN_CENTER_REMOTE_NAME = "conancenter"

Fixed in #185