-
Notifications
You must be signed in to change notification settings - Fork 46
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
Include the Conan wrapper into the main CMakeLists.txt? #53
Comments
As you mentioned as a drawback, some people maybe don't want Conan related code if they use your library. I saw this wrapper injection in the google benchmark library. Of course the goal should be, to add the library to the conan-center-index. |
Conan should still be fully optional of course, so it should always be possible to compile without it. Something like here. Are there any drawbacks using this way? |
No there are no drawbacks. Pls describe your use case: I think you need it for getting boost binaries from conan-center and you want to call |
Exactly, the main reason for the idea is to simplify the build. However I'm not quite sure if this may interfere with the other cmake generators.
That makes sense to me, but before submitting it, I want to improve some things. Unfortunately I can't get Conan to work with Boost and Catch at the moment too. |
But the build should also work without conan and with conan you can call
I'm looking forward to find it on conan-center-index soon 😉 |
I see, thanks for your help! |
Does it make sense to include the Conan wrapper cmake code into the main CMakeLists.txt?
The relevant part consists only of two lines, but the wrapper complicates the build unnecessarily.
Another possible approach: Test whether
conanbuildinfo.cmake
exists; if so, include it and callconan_basic_setup()
.Benefit:
It simplifies the Conan build and it remains fully optional.
Drawback:
It introduces Conan related code – it's still optional though.
CC @steinerthomas
The text was updated successfully, but these errors were encountered: