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
[bug] CMakeDeps.generate() fails when build_context_activated
is used
#13209
Comments
Hi @petermbauer Thanks for your detailed report. It seems you are missing |
Hi @memsharded , thanks for the quick reply! |
That is really unexpected, and I checked, there are tests in the test suite that explicitly test that this is working, and I wrote a new test too, it worked with that. There might be something else there that is causing that error. Maybe if you could define env-var CONAN_VERBOSE_TRACEBACK to display a larger traceback, that could help. Or trying to post a bit more complete conanfiles, like there might be some detail, for example the |
Ah, thanks for pointing me to the
This is the minimal conanfile.py to reproduce it: from conan import ConanFile
from conan.tools.cmake import CMakeDeps
class SomeAppConan(ConanFile):
name = "someapp"
settings = ("os", "compiler", "build_type", "arch")
tool_requires = ["clang-style-tools-integration/2.3.1@us/release"]
def generate(self):
deps = CMakeDeps(self)
deps.build_context_activated = ["clang-style-tools-integration"]
deps.build_context_build_modules = ["clang-style-tools-integration"]
deps.generate() Here is the conanfile.py of the dependency:
|
Quick hint for 2.0: #13226. This makes the traces more naturally to appear with |
Thanks for the details, I managed to reproduce with them. I am submitting a potential fix in #13260 for 1.60, but not sure if it will work, sounds a bit risky. In the meantime, the issue was caused because missing |
I have some bad news, the changes in #13260 required to explicitly change a test that was capturing the behavior that the build context should have its own different build_type. I am concerned that the proposed change would be breaking users relying on this. While I think this could be changed in 2.0, aligning host and build contexts behavior, I don't think it is possible to do it in 1.X safely. The alternatives would be:
|
Thanks for taking care of this, no problem to set a |
Ok, excellent, I'll move the PR #13260 to 2.0 then, thanks! |
Fixed in #13267 for next 2.0.1 |
Environment details
Steps to reproduce
conanfile.py
conanfile.py
of theclang-style-tools-integration
package:conan install ..
When using the same package as "private" requires instead of as
tool_requires
and without thedeps.build_context_activated =
it works without any other changes so i assume the recipe is basically ok.Logs
The text was updated successfully, but these errors were encountered: