diff options
| author | hathach <[email protected]> | 2024-04-02 18:14:49 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-04-02 18:14:49 +0700 |
| commit | 18a458679f9581f53108005f0cd028acc79236e2 (patch) | |
| tree | 21d7ccb76588b97dd463137839d914baf3fe694c /examples/build_system/cmake | |
| parent | 2a21b6980b8efc87adb44f20a60a5f2ffda79518 (diff) | |
| parent | 574916f53088adebb6d0f2cede4a96e99ef9e605 (diff) | |
Merge branch 'master' into MCX
Diffstat (limited to 'examples/build_system/cmake')
| -rw-r--r-- | examples/build_system/cmake/toolchain/arm_gcc.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/examples/build_system/cmake/toolchain/arm_gcc.cmake b/examples/build_system/cmake/toolchain/arm_gcc.cmake index 7680d75ab..d3fd5b557 100644 --- a/examples/build_system/cmake/toolchain/arm_gcc.cmake +++ b/examples/build_system/cmake/toolchain/arm_gcc.cmake @@ -1,8 +1,14 @@ set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_C_COMPILER "arm-none-eabi-gcc") -set(CMAKE_CXX_COMPILER "arm-none-eabi-g++") -set(CMAKE_ASM_COMPILER "arm-none-eabi-gcc") +if (NOT DEFINED CMAKE_C_COMPILER) + set(CMAKE_C_COMPILER "arm-none-eabi-gcc") +endif () + +if (NOT DEFINED CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER "arm-none-eabi-g++") +endif () + +set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) set(CMAKE_SIZE "arm-none-eabi-size" CACHE FILEPATH "") set(CMAKE_OBJCOPY "arm-none-eabi-objcopy" CACHE FILEPATH "") |
