-
Notifications
You must be signed in to change notification settings - Fork 989
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] CMakeToolchain: CMAKE_SYSTEM_PROCESSOR and CMAKE_SYSTEM_NAME not set properly #14126
Comments
Hi @nicosmd The current definition of CMAKE_SYSTEM_NAME is: def _get_cross_build(self):
user_toolchain = self._conanfile.conf.get("tools.cmake.cmaketoolchain:user_toolchain")
if user_toolchain is not None:
return None, None, None # Will be provided by user_toolchain
system_name = self._conanfile.conf.get("tools.cmake.cmaketoolchain:system_name")
def context(self):
system_name, system_version, system_processor = self._get_cross_build()
...
return {"toolset": toolset,
"generator_platform": generator_platform,
"cmake_system_name": system_name, So it seems this is by design. Once the But it is true that if the |
It seems that it makes sense to listen to |
Lucky that I found this ticket. I just ran into the same issue when experimenting with packaging Clang (see #14542). In that case, the same package can be used for (cross)compiling to different target architectures and because of that, an included toolchain file cannot even know the correct system processor/name. |
Here goes the PR for it #14556, for next 2.0.10 |
Environment details
Steps to reproduce
Hey,
I encountered the issue described in this issue: #13914
When I use a toolchain package with a
package_info
method looking likeusing a profile similar to
the conan_toolchain.cmake contains
, which is as expected.
But as far as I add
to the profile, both variables aren't set anymore in the conan_toolchain.cmake.
The toolchain_extras.cmake basically contains only some project specific variables, nothing special.
In both cases
is set properly.
What could I do wrong?
Thanks!
Logs
No response
The text was updated successfully, but these errors were encountered: