Skip to content

Commit ae7a226

Browse files
committed
M2354: Pre-create cmake target mbed-m2354-tfm for custom_targets
For M2354 custom target, there is dilemma on cmake target mbed-m2354-tfm: 1. mbed-m2354-tfm is created in mbed-os M2354 cmake listfile, but may be used in custom_targets M2354 cmake listfile in advance. 2. Build system requires add_subdirectory(custom_targets) be placed in front of add_subdirectory(mbed-os). To overcome above, mbed-m2354-tfm is pre-created on request and as singleton, E.g.: if(NOT TARGET mbed-m2354-tfm) add_library(mbed-m2354-tfm INTERFACE) endif()
1 parent 24aa822 commit ae7a226

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_library(mbed-m2354-tfm INTERFACE)
4+
if(NOT TARGET mbed-m2354-tfm)
5+
add_library(mbed-m2354-tfm INTERFACE)
6+
endif()
57

68
if("NU_M2354" IN_LIST MBED_TARGET_LABELS)
79
add_subdirectory(TARGET_NU_M2354)

0 commit comments

Comments
 (0)