CMake: Move rtos stubs sources to the mbed-os/rtos directory

Move the rtos stub library into the rtos component directory.
so we can avoid duplicating the mbed-os source tree in a central
UNITTESTS folder.
pull/14819/head
Rajkumar Kanagaraj 2021-06-23 04:20:36 -07:00
parent de7e326bc1
commit 6a5f3ae661
13 changed files with 17 additions and 4 deletions

View File

@ -123,7 +123,6 @@ add_subdirectory(connectivity)
add_subdirectory(events)
add_subdirectory(hal)
add_subdirectory(platform)
add_subdirectory(rtos)
add_subdirectory(storage)
add_library(mbed-stubs INTERFACE)

View File

@ -1,6 +1,10 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
add_subdirectory(tests/UNITTESTS)
endif()
target_include_directories(mbed-core
INTERFACE
.

1
rtos/tests/.mbedignore Normal file
View File

@ -0,0 +1 @@
UNITTESTS/*

View File

@ -0,0 +1,4 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
add_subdirectory(doubles)

View File

@ -3,6 +3,8 @@
add_library(mbed-stubs-rtos)
add_definitions(-DUNITTEST)
target_sources(mbed-stubs-rtos
PRIVATE
ConditionVariable_stub.cpp
@ -16,7 +18,10 @@ target_sources(mbed-stubs-rtos
)
target_link_libraries(mbed-stubs-rtos
PRIVATE
mbed-headers
mbed-stubs-headers
PRIVATE
mbed-headers-base
mbed-headers-rtos
mbed-headers-platform
mbed-headers-drivers
mbed-headers-hal
)