Skip to content

Commit

Permalink
M2354: Pre-create cmake target mbed-m2354-tfm for custom_targets
Browse files Browse the repository at this point in the history
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()
  • Loading branch information
ccli8 committed Oct 21, 2024
1 parent 24aa822 commit ae7a226
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_library(mbed-m2354-tfm INTERFACE)
if(NOT TARGET mbed-m2354-tfm)
add_library(mbed-m2354-tfm INTERFACE)
endif()

if("NU_M2354" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NU_M2354)
Expand Down

0 comments on commit ae7a226

Please sign in to comment.