You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some experimentations of tricky recipes in conan-center, I have the feeling that dowtream traits affect files generated by CMakeDeps for transitive dependencies, instead of affecting the downstream recipe. Is it correct?
Example:
libA depends on libB, no traits (so libB is private)
libA & libB shared
Now in test package of libA, we just require libA, and for some reason we want to call find_package(libB REQUIRED) & link libB::libB target. When I do this, headers are not found, even though libB::libB is explicitly linked in CMakeLists of test package. So my understanding is that files generated by CMakeDeps for libB depend on libA and requirements() content of root conanfile, and it's very weird. I would have expected that traits logic would live in config files of libA, not libB.
I know that for conan, it's a hack to link libB::libB if it's a transitive dependency, but for some recipes it's impossible to add an explicit require to libB in test package (when it depends on options of libA for example, which can't be evaluated in requirements() of test package, or when versioning compatibility is tricky).
What is your question?
After some experimentations of tricky recipes in conan-center, I have the feeling that dowtream traits affect files generated by CMakeDeps for transitive dependencies, instead of affecting the downstream recipe. Is it correct?
Example:
Now in test package of libA, we just require libA, and for some reason we want to call find_package(libB REQUIRED) & link libB::libB target. When I do this, headers are not found, even though libB::libB is explicitly linked in CMakeLists of test package. So my understanding is that files generated by CMakeDeps for libB depend on libA and requirements() content of root conanfile, and it's very weird. I would have expected that traits logic would live in config files of libA, not libB.
I know that for conan, it's a hack to link libB::libB if it's a transitive dependency, but for some recipes it's impossible to add an explicit require to libB in test package (when it depends on options of libA for example, which can't be evaluated in requirements() of test package, or when versioning compatibility is tricky).
Some concrete examples:
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: