CMake: Fix detection of RTX assembly file

Access MBED_TARGET_LABELS as a global variable instead of a property.
At this point the evaluation of the property MBED_TARGET_LABELS
created in the top level CMakeLists.txt results in an empty string.
pull/13566/head
Hugues Kamba 2020-07-31 21:19:05 +01:00
parent 4af48a3425
commit 42cd929418
1 changed files with 2 additions and 4 deletions

View File

@ -2,8 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
function(_mbed_get_rtx_assembly toolchain_dir)
get_property(target_labels GLOBAL PROPERTY MBED_TARGET_LABELS)
foreach(key ${target_labels})
foreach(key ${MBED_TARGET_LABELS})
if(${key} STREQUAL CORTEX_A)
set(STARTUP_RTX_FILE TARGET_CORTEX_A/irq_ca.S)
elseif(${key} STREQUAL M0)
@ -28,8 +27,7 @@ function(_mbed_get_rtx_assembly toolchain_dir)
endfunction()
function(_mbed_add_cortexa_handler_if)
get_property(target_labels GLOBAL PROPERTY MBED_TARGET_LABELS)
foreach(key ${target_labels})
foreach(key ${MBED_TARGET_LABELS})
if(${key} STREQUAL CORTEX_A)
target_sources(mbed-os PRIVATE Config/TARGET_CORTEX_A/handlers.c)
endif()