mbed-tools icon indicating copy to clipboard operation
mbed-tools copied to clipboard

how to set CMAKE_CXX_COMPILER ?

Open Layty opened this issue 1 year ago • 0 comments

I have two gcc in path , how can I use the second?

Now I have to fix mbed-os\tools\cmake\toolchains\GCC_ARM.cmake

set(CMAKE_ASM_COMPILER "arm-none-eabi-gcc") set(CMAKE_C_COMPILER "arm-none-eabi-gcc") set(CMAKE_CXX_COMPILER "arm-none-eabi-g++")

to

set(CMAKE_ASM_COMPILER "arm-none-eabi-gcc")

set(CMAKE_C_COMPILER "arm-none-eabi-gcc")

set(CMAKE_CXX_COMPILER "arm-none-eabi-g++")

then use

cmake -D CMAKE_CXX_COMPILER=xxx -D CMAKE_C_COMPILER=xxx ?

Layty avatar Jan 10 '24 08:01 Layty