Skip to content

how to set CMAKE_CXX_COMPILER ? #334

Open
@Layty

Description

@Layty

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions