ARMmbed / ARMmbed/mbed-tools

how to set CMAKE_CXX_COMPILER ?

Open
#334 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
49
Forks
32
PR merge metrics
No merged PRs in 30d

Description

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 ?

Contributor guide

Open the contributing guide

Research direction

Start with mbed-os\tools\cmake\toolchains\GCC_ARM.cmake and the CMake command shown in the issue. Determine whether compiler selection is intended to be passed through CMake variables or requires toolchain-file changes; done means documenting or supporting a clear way to select the second GCC installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, embedded-iot
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.