-
Notifications
You must be signed in to change notification settings - Fork 25
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
Allow a pre-configure step, to allow conan integration #114
Comments
Need more information to make progress on this:
CDT already provides pre-build-steps, wouldn't "conan install" satisfy your needs?
That sounds to me like |
You could call it an dependency manager, say you need zlib, and one other library that in turn uses zlib. conan would prepare those libraries and make sure there is only one version of zlib. (and there are other nice things like public and private caches of compiled libraries).
is an opensource github project with a skeleton for conan + cmake (you will find several talks on youtube from Mpusz about the details). nothing more, nothing less, I brought this up as working testcase.
that could be easily done by a script, but
Yes, thats debatable. The point is that you share configuration between Conan + Cmake, and to an extend Eclipse. Having 3 settings dialogs for the same thing is unwieldy. Both need to agree on compiler and targetsystem, conan can build missing libraries from source, which might be a CMake project itself and would need the same settings (CMake Toolchain file, build type) your Plugin uses for invoking CMake. |
IMHO it would make much more sense to let CMake handle dependency resolution and place the dependencies in the CMakeLists.txt. When you want to build on your CI-system and have the dependency specified in cmakelists, you do hot have to replicate the deps from the IDE settings again.
|
Yes I know of the first 3 of these, and they are way inferior to what conan provides.
if you use libA and libB, libB beeing a standard CMake project using libA in turn, If you use PMM or another dropin for conan, it would need would similar support for configuration and prebuild-steps. BTW, CDT's prebuild steps dont seem to work when your plugin is doing the build. |
You are right, these only work for the GNU make builder . WTF. |
#91 could also help here (although working prebuild step would maybe be nicer) Also, do you know cmake-conan? This is what I use to solve this problem, it calls conan install during cmakes configuration step. |
Another usecase/problem to consider here: If CMake (and maybe make or Ninja as well) itself is installed via Conan, a script |
For illustration, there is a plugin for Clion, written about in the Clion Blog. Whats relevant is that Conan can build missing libraries from source, whether they are themselfes CMake projects or not, and can create a CMake file for your build (again, also if they are not CMake Projects themselfes), that will setup any required paths transparently. |
Adding a pre-build step would also allow integrating Spack, a package manager coming from the HPC community. Spack lets you set up an environment with different versions of libraries, and compilers. IMHO, the compiler part is crucial in this case, as it's something that has to be set up before you run cmake, and cannot (or rather should not) be inferred form CMakeLists.txt I would use something like: |
This is a...
Allow a pre-configure step, to allow conan integration.
conan is getting increasingly popular and fills some features that
arent solveable (in a clean way) within CMake itself.
What I would like to be able:
Further enhancement would be to forcefully re-run the steps (conan or cmake).
Notes
I know about #91, but this seems to tackle a different issue as I dont want env variables to be set, and the request is specifically about conan. Generalization would be a plus I think, but making CMake + Conan usable in a mostly painless fashion would be most important.
The text was updated successfully, but these errors were encountered: