I’m working on a C++11 project that uses Conan2 for dependency management and CMake for building. The project has a structure like this:
Libraries: libA, libB, coreLib
Modules: 22 modules, like module1, module2, etc. (All depends on coreLib)
Main Executable: MainApp depends on all libraries and modules.
The coreLib is a shared dependency across all modules. When I make any changes to coreLib, it results in a new version (e.g., from coreLib/1-release to coreLib/2-release).
Currently, this requires me to:
Manually update the version of coreLib in each module's conanfile.py.
Recompile all the modules with the new version.
Build the MainApp executable with the updated modules.
Challenges I'm Facing:
Recompiling all 22 modules takes around 2 hours, even when changes in coreLib are internal and don’t impact the module interfaces.
If I don’t recompile a module, I run into version mismatch issues when building MainApp, as some modules may still reference coreLib/1-release while others use coreLib/2-release.
I’m looking for a way to skip recompilation of modules when it’s not needed, ideally automating this process.
What I’ve Tried:
I explored using override=True in the conanfile.py but encountered issues when versions didn’t match.
I also considered using conan lock files for managing consistency, but this doesn’t solve the recompilation problem directly.
Question:
Is there a way in Conan to manage this scenario more efficiently, such as:
Allowing modules to use different versions of coreLib during the build of MainApp without triggering recompilation?
Any guidance or best practices for handling such dependency updates would be greatly appreciated!
Hey
I’m working on a C++11 project that uses Conan2 for dependency management and CMake for building. The project has a structure like this:
Libraries: libA, libB, coreLib Modules: 22 modules, like module1, module2, etc. (All depends on coreLib) Main Executable: MainApp depends on all libraries and modules.
The coreLib is a shared dependency across all modules. When I make any changes to coreLib, it results in a new version (e.g., from coreLib/1-release to coreLib/2-release).
Currently, this requires me to:
Challenges I'm Facing:
I’m looking for a way to skip recompilation of modules when it’s not needed, ideally automating this process.
What I’ve Tried:
Question:
Is there a way in Conan to manage this scenario more efficiently, such as:
Any guidance or best practices for handling such dependency updates would be greatly appreciated!