cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

Use CMAKE_TOOLCHAIN_FILE if provided

Open JulianH1989 opened this issue 5 months ago • 3 comments

I have tested this wrapper on cross arm_none_eabi builds with windows. Turns out it failed because conan was ignoring my toolchain file and letting cmake guess compiler arguments which made my cross arm none eabi build fail.

=> Test if the user has set CMAKE_TOOLCHAIN_FILE via CLI or via preset. If this is set pass this to conan

JulianH1989 avatar Nov 05 '25 15:11 JulianH1989

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 05 '25 15:11 CLAassistant

@memsharded I added a test repo. However i'm not familiar with Github Workflows. Could you add the test project to the workflows.

invoke it with

cmake --preset arm_none_eabi_gcc_14_win
cmake --build --preset cmake --preset arm_none_eabi_gcc_14_win_rel

and it should work. i have tested it locally on my windows 11 machine. There is a linux preset as well which should work

JulianH1989 avatar Nov 06 '25 09:11 JulianH1989

hey guys, any further comments on this :) ?

JulianH1989 avatar Nov 07 '25 09:11 JulianH1989