CMake: Fix ARM toolchain configuration

mbed_generate_gcc_options_for_linker is to
be called only when GCC_ARM is selected.
pull/13566/head
Hugues Kamba 2020-09-11 19:10:50 +01:00
parent e22b19d6db
commit 37dd6d6064
1 changed files with 1 additions and 1 deletions

View File

@ -76,8 +76,8 @@ endfunction()
#
function(mbed_set_mbed_target_linker_script target)
get_property(mbed_target_linker_script GLOBAL PROPERTY MBED_TARGET_LINKER_FILE)
mbed_generate_gcc_options_for_linker(${target} _linker_preprocess_definitions _linker_preprocess_options)
if(MBED_TOOLCHAIN STREQUAL "GCC_ARM")
mbed_generate_gcc_options_for_linker(${target} _linker_preprocess_definitions _linker_preprocess_options)
set(CMAKE_PRE_BUILD_COMMAND
COMMAND "arm-none-eabi-cpp" -E -P
${_linker_preprocess_options} ${_linker_preprocess_definitions}