-
Notifications
You must be signed in to change notification settings - Fork 254
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
Support unknown architectures #582
Conversation
Conan supports non-standard architectures through the installation of custom settings.yml files. However, conan-cmake currently expects to be able to translate the architecture from the CMake naming scheme to the Conan naming scheme, and fails with an error if the architecture is unknown. This patch resolves the issue by making the script simply pass through the CMake architecture to Conan unchanged in these cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say this is valid, probably less blocking than not setting an arch
at all. I'll ask for second opinion to @jcar87 though
@jhol - is there a specific use case that isn't covered - that is, a specific value for We now have the ability to define The problem with having this fallback, is that there isn't anything that guarantees that the CPU architecture as known by CMake, maps to anything that is known by Conan in settings.yml - it could still result in an error, and it offers no hint whatsoever. But hard to comment without a specific use case. |
I'm working on a project that uses a proprietary MIPS-like architecture on a device provided to us by a commercial partner organization. Sorry, I'm not at liberty to disclose the exact name of the architecture, but we have received a forked version of GCC to target this device. In this case, we install a custom Once this is installed, Conan is perfectly able to behave as we would normally expect. In our The current implementation is certainly broken. It should not be possible for execution to proceed out of this CMake function with It is true to say that my change is making something of a leap to say that for unknown arches, the Conan arch name is the same the GCC arch name, but I don't think this is an unreasonable expectation. |
Not quite. This is covered here: https://github.com/conan-io/cmake-conan/tree/develop2#customizing-conan-profiles, the detected settings are overlaid on top of the You can define the CMake variable I have two additional questions:
If the answer is yes in both cases, it may be worth a shot adding a profile (or set of profiles) alongside settings.yml, and defining |
Partially correct. I was wrong to say the value is set from
Another mistake on my part. Yes, we are using
We could try that, certainly. |
Well it works to use a profile. So this PR can be closed. Though I will give this feedback: In our system we support multiple target devices using CMake options. Therefore, In our case, our It would be much nicer to have a programmatic way to do all this. I would like to be able to pass CMake lists of Conan settings and options, and have Certainly, the original design of cmake-conan was more convenient in this regard. |
Conan supports non-standard architectures through the installation of custom
settings.yml
files. However, conan-cmake currently expects to be able to translate the architecture from the CMake naming scheme to the Conan naming scheme, and fails with an error if the architecture is unknown.This patch resolves the issue by making the script simply pass through the CMake architecture to Conan unchanged in these cases.