conan: [bug] `tools.cmake.cmaketoolchain`: `system_name` & `system_processor` configs not respected
Environment details
- Operating System+version: M1 Mac Ventura 13.3.1 (a)
- Compiler+version: N/A
- Conan version: 2.0.4
- Python version: 3.10.2
Steps to reproduce
Set the following configuration options in a package and consume in a library and see that it does not get set in the conan_toolchain.cmake
.
def package_info(self):
self.conf_info.define(
"tools.cmake.cmaketoolchain:system_name", "GENERIC")
self.conf_info.define(
"tools.cmake.cmaketoolchain:system_processor", "ARM")
self.conf_info.define("tools.build.cross_building:can_run", False)
self.conf_info.define("tools.build:compiler_executables", {
"c": "arm-none-eabi-gcc",
"cpp": "arm-none-eabi-g++",
"asm": "arm-none-eabi-as",
})
Logs
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (15 by maintainers)
Totally understand. I was actually working on a stripped down version myself. I’ll see what I can provide. Thank you!
Yes I am.
No, this is the full
package_info()
method:No, I’m just using the
generators = "CMakeToolchain", "CMakeDeps", "VirtualBuildEnv"
No, I am not. Trying to let the conf’s travel from the package.
Logs when I use this without a toolchain file forcing the values to be GENERIC and ARM is:
Here is my
conan_toolchain.cmake
file:And you can see above that its using Darwin because its the build target but not the host target, which should be ARM and GENERIC.
You can use my PR to conan-center-index as thats what I’m using to generate these logs. https://github.com/conan-io/conan-center-index/pull/17528