Unit tests: Move cmsis target_h stubs

This creates a new mbed-headers-cmsis which is always and only used
by mbed-headers-platform, so we add the former to the laters' linked
targets.
pull/14929/head
Lingkai Dong 2021-07-07 16:49:54 +01:00
parent 44cd64a3e4
commit 7e3565b5f5
12 changed files with 17 additions and 0 deletions

View File

@ -4,3 +4,6 @@
add_subdirectory(CMSIS_5)
add_subdirectory(device)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
add_subdirectory(tests/UNITTESTS/doubles)
endif()

View File

@ -0,0 +1 @@
*

View File

@ -0,0 +1,9 @@
# Copyright (c) 2021 Arm Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
add_library(mbed-headers-cmsis INTERFACE)
target_include_directories(mbed-headers-cmsis
INTERFACE
.
)

View File

@ -10,6 +10,10 @@ target_include_directories(mbed-headers-platform
${mbed-os_SOURCE_DIR}/platform/randlib/include/
${mbed-os_SOURCE_DIR}/platform/mbed-trace/include
)
target_link_libraries(mbed-headers-platform
INTERFACE
mbed-headers-cmsis
)
add_library(mbed-stubs-platform)
target_sources(mbed-stubs-platform