-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[develop2] General feedback #512
Comments
Hi @ssrobins Thanks very much for trying out and the feedback!
Sounds good, I think it can be added
Agree, we separated the files while trying out different things, in can be consolidated in a single file. Wdyt @jcar87 ?
I am not sure this would work, develop does this after
Detection of Android and iOS would be good, feel free to contribute it!
We know that allowing to customize settings would be necessary, but we are not so sure about the interface. We think that probably not modifying the |
I was successfully able to do this in a local test on macOS, I just have to put the download commands and I've always been ok with putting Conan in my CMake, but I understand there are situations where the code author wants to let the user decide how they will manage the project dependencies. I wouldn't want to deal with an extra
No problem, feel free to tag me into any discussions or design docs if you want feedback! |
The thing is that this probably wouldn't be best practice. For example, the moment it is not a pure consumer, but you want to create a package out of it, this would be extremely problematic, require conditionals to activate it or not, further polluting the
Yes, defining it in presets seems the way to go, clean and convenient from both sides, maintainers of the CMakeLists.txt and users (developers) building the project. |
@memsharded For instance, now on MSVC it automatically sets |
@mkviatkovskii that could be a different issue. If the VS runtime is defined by CMake, then the automatic detection in the provider should take it into account. Most likely it is hardcoded at the moment, and it requires to be implemented. The idea is not that you have to define it, but if it is defined by CMake, then it should be automatic. |
I also want the same, single source of truth, one inte4rface to build ... |
Hi @ssrobins thanks a lot for your feedback and for contributing to move this forward. I have a few comments on some of the points.
On the one hand, indeed one shouldn't alter On the other hand, as per CMake documentation, the dependency provider via Our recommendation would be that for projects who wish to do this, to include their copy of
I would say that we need to be very careful about enabling such functionality - I would say that is beyond the scope of the tool, and the tool assumes that Conan is minimally configured to satisfy the required dependencies. We need to consider that Once again, thanks for your feedback. We'll continue working on the other points as well :) |
I think simply setting I could even have it within an
This is not beyond the scope of what I would expect from the tool, especially since Checking for the remote and telling the user to fix it is...just ok, in my view. I want developers to have as few of manual interventions needed as possible to get a working build. These sorts of things have a way of adding up and creating a lot of developer toil that delays developers from getting to the task at hand.
|
@memsharded @czoido Is it possible to return previous approach for cmake-conan wrapper ? I really like previous interface for cmake-conan that allow to use only cmake, without knowing someone the dependecies was installed using conan ... |
This sounds very much like what the |
I updated my original post with links to PRs for the work that's already done, put strikethroughs and additional notes for things that I didn't need, and made separate issues/PRs for everything else:
Therefore, I will close this issue. Not sure if this is feasible, but I'd absolutely love to wrap up the list above before the end of the year. This would help with Conan 2.x migration at work and set up some hobby projects very well. I'd also love to contribute a video demo of CMake dependency provider to social media to put out the good word :) And of course, going forward, I would be proud to continue supporting this project so feel free to tag me in on things. Conan rocks! -Steve |
Thanks for supporting this very important workflow in Conan 2.0!
I used the original CMake wrapper in personal projects and I still use it at work. I only stopped using it so I could use Conan 2.0 beta, then I converted to something like this.
...and now I'm trying
develop2
out!Here are the main reasons why I use the CMake wrapper:
Onto what I like about
develop2
:--build
flag or add--update
intoconan install
.detect
functions are an excellent abstraction. I even started adding additional settings to support iOS and Android and it was going together very smoothly! (happy to share)conan install
. Generating the whole file and then referencing it inconan install
is way cleaner with fewer files.Here's what I'd love for you to please consider changing (and with your blessing, I'm happy to contribute all of these changes):
conan_provider.cmake
andconan_support.cmake
into one file so there's only one file to copy or download into my codebase. Feature/reorg #519AllowSince there were objections to this, I'll just make the change in my repos.develop2
to be downloaded at CMake time just likedevelop
does (and include the code snippet in documentation). I think it can still be done without affectingCMAKE_PROJECT_TOP_LEVEL_INCLUDES
.Add support for hardcoding settings. I'm having trouble deducing certain settings from CMake such asFigured out a way, it's done in Add iOS, tvOS, and watchOS support #528 and 1ae6cddos.sdk
on iOS andcompiler.runtime
on Windows. If there's a function to just add a setting, the user could set unsupported values and/or override default behavior.tools.system.package_manager:mode
or(actually, found a way for NDK path!). If there's a function to append/override profile configuration settings, I'm all set!tools.android:ndk_path
AddAbandoning this. For hobby projects, I converted to use conancenter instead of my own artifactory server so the default remote setting is all I need. For work stuff, I'm ok with adding some CMake code to do this because Conan is required so we have no motivation to try to separate the Conan and CMake code.conan_add_remote()
function fromdevelop
. I want to be able to add a remote automatically in cases where an alternate artifactory server houses the packages. It also makes it easy to directly specify the remote name in theconan install
command.Anyway, thanks for reading. Happy to implement any of these things, though I totally understand if my needs are in the minority and that the tool needs to go in a different direction.
The text was updated successfully, but these errors were encountered: