mirror of https://github.com/ARMmbed/mbed-os.git
CMake: unit-tests: Move mbed-headers-platform to platform directory
Move the header-only mbed-headers-platform library the unit test stubs depend on into the platform component directory. This makes the platform stubs more self contained and improves composition of the library.pull/14773/head
parent
40435fd9b3
commit
e2704749f1
|
@ -4,7 +4,6 @@
|
|||
add_library(mbed-stubs-headers INTERFACE)
|
||||
add_library(mbed-headers INTERFACE)
|
||||
add_library(mbed-headers-base INTERFACE)
|
||||
add_library(mbed-headers-platform INTERFACE)
|
||||
add_library(mbed-headers-connectivity INTERFACE)
|
||||
add_library(mbed-headers-events INTERFACE)
|
||||
|
||||
|
@ -19,15 +18,6 @@ target_link_libraries(mbed-headers
|
|||
mbed-headers-rtos
|
||||
)
|
||||
|
||||
target_include_directories(mbed-headers-platform
|
||||
INTERFACE
|
||||
${mbed-os_SOURCE_DIR}/platform/include
|
||||
${mbed-os_SOURCE_DIR}/platform/include/platform
|
||||
${mbed-os_SOURCE_DIR}/platform/randlib/include/mbed-client-randlib/
|
||||
${mbed-os_SOURCE_DIR}/platform/randlib/include/
|
||||
${mbed-os_SOURCE_DIR}/platform/mbed-trace/include
|
||||
)
|
||||
|
||||
target_include_directories(mbed-headers-base
|
||||
INTERFACE
|
||||
${mbed-os_SOURCE_DIR}/UNITTESTS/target_h
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_library(mbed-stubs-platform)
|
||||
add_library(mbed-headers-platform INTERFACE)
|
||||
target_include_directories(mbed-headers-platform
|
||||
INTERFACE
|
||||
${mbed-os_SOURCE_DIR}/platform/include
|
||||
${mbed-os_SOURCE_DIR}/platform/include/platform
|
||||
${mbed-os_SOURCE_DIR}/platform/randlib/include/mbed-client-randlib/
|
||||
${mbed-os_SOURCE_DIR}/platform/randlib/include/
|
||||
${mbed-os_SOURCE_DIR}/platform/mbed-trace/include
|
||||
)
|
||||
|
||||
add_library(mbed-stubs-platform)
|
||||
target_sources(mbed-stubs-platform
|
||||
PRIVATE
|
||||
mbed_critical_stub.c
|
||||
|
@ -17,12 +26,10 @@ target_sources(mbed-stubs-platform
|
|||
randLIB_stub.c
|
||||
randLIB_stub.cpp
|
||||
)
|
||||
|
||||
target_link_options(mbed-stubs-platform
|
||||
PRIVATE
|
||||
--coverage
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-stubs-platform
|
||||
PRIVATE
|
||||
mbed-headers
|
||||
|
|
Loading…
Reference in New Issue