Skip to content
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

[question] Is it possible to use conan with multiple build systems (cmake, gn, Bazel, etc.) #8644

Closed
blockspacer opened this issue Mar 14, 2021 · 2 comments
Assignees

Comments

@blockspacer
Copy link

blockspacer commented Mar 14, 2021

I need (as many others) dependency manager that is not tied to a particular C++ build system. Please provide any information about how to use conan with multiple build systems.

Can conan be used in scenario below?

  • (main project) project A uses CMake
  • (dependency) project B uses gn
  • (dependency) project C uses Bazel
  • project A depends on project B and project C

CMake can see public definitions (target_compile_definitions) and public include directories (target_include_directories) created by other CMake dependencies.

Is it possible to use public definitions and include directories created by gn/Bazel/etc. project in CMake project?

Maybe conan can be used to store build information parsed from compile_commands.json and generate files per each build system (files with variables that store compile definitions and include directories)?

related to
#6235 (comment)
#6235 (comment)

@memsharded
Copy link
Member

Hi @blockspacer

Yes, definitely. Conan is not tied to any build system, you can see it supports many: https://docs.conan.io/en/latest/integrations/build_system.html

The greatest part is that every package can have its own build system, consume dependencies that are using other build systems and be used by others with different build systems. It basically works as follows:

At the moment there is no Bazel generator, we are aware of some users using Conan for Bazel, but it was not contributed back to open source. If anyone is interested in contributed, we would certainly help in the process

@memsharded
Copy link
Member

Another good resource is ConanCenter https://conan.io/center (recipes in https://github.com/conan-io/conan-center-index), it contains hundreds of packages, using different build systems.

Please let me know if the above helps, or you have any further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants