Skip to content

Commit 8287c52

Browse files
authored
Merge pull request #14773 from rwalton-arm/move_platform_stub
Move mbed-stubs-platform to the platform directory
2 parents b490c67 + 55f77ea commit 8287c52

21 files changed

+43
-47
lines changed

UNITTESTS/stubs/CMakeLists.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
add_library(mbed-stubs-headers INTERFACE)
55
add_library(mbed-headers INTERFACE)
66
add_library(mbed-headers-base INTERFACE)
7-
add_library(mbed-headers-platform INTERFACE)
87
add_library(mbed-headers-connectivity INTERFACE)
98
add_library(mbed-headers-events INTERFACE)
109

@@ -19,15 +18,6 @@ target_link_libraries(mbed-headers
1918
mbed-headers-rtos
2019
)
2120

22-
target_include_directories(mbed-headers-platform
23-
INTERFACE
24-
${mbed-os_SOURCE_DIR}/platform/include
25-
${mbed-os_SOURCE_DIR}/platform/include/platform
26-
${mbed-os_SOURCE_DIR}/platform/randlib/include/mbed-client-randlib/
27-
${mbed-os_SOURCE_DIR}/platform/randlib/include/
28-
${mbed-os_SOURCE_DIR}/platform/mbed-trace/include
29-
)
30-
3121
target_include_directories(mbed-headers-base
3222
INTERFACE
3323
${mbed-os_SOURCE_DIR}/UNITTESTS/target_h
@@ -74,7 +64,6 @@ target_include_directories(mbed-stubs-headers
7464

7565
add_subdirectory(connectivity)
7666
add_subdirectory(events)
77-
add_subdirectory(platform)
7867

7968
add_library(mbed-stubs INTERFACE)
8069

UNITTESTS/stubs/connectivity/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ target_link_libraries(mbed-stubs-connectivity
4040
mbed-headers
4141
mbed-stubs-headers
4242
mbed-stubs-rtos
43+
mbed-stubs-platform
4344
gtest
4445
)

UNITTESTS/stubs/platform/CMakeLists.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

connectivity/cellular/tests/UNITTESTS/doubles/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ target_link_libraries(mbed-stubs-cellular
5151
PRIVATE
5252
mbed-headers-base
5353
mbed-headers-connectivity
54-
mbed-headers-platform
54+
mbed-stubs-platform
5555
mbed-headers-rtos
5656
mbed-headers-drivers
5757
mbed-headers-hal

platform/tests/UNITTESTS/ATCmdParser/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ target_sources(${TEST_NAME}
1313

1414
target_link_libraries(${TEST_NAME}
1515
PRIVATE
16-
mbed-headers
17-
mbed-stubs-headers
1816
mbed-stubs-platform
1917
gmock_main
2018
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (c) 2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
add_subdirectory(doubles)
45
add_subdirectory(ATCmdParser)
56
add_subdirectory(CircularBuffer)

platform/tests/UNITTESTS/CircularBuffer/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ set(TEST_NAME circularbuffer-unittest)
66
add_executable(${TEST_NAME})
77

88
target_sources(${TEST_NAME}
9-
PRIVATE
9+
PRIVATE
1010
test_CircularBuffer.cpp
1111
)
1212

1313
target_link_libraries(${TEST_NAME}
1414
PRIVATE
15-
mbed-headers
16-
mbed-stubs-platform
15+
mbed-stubs-platform
1716
gmock_main
1817
)
1918

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_library(mbed-headers-platform INTERFACE)
5+
target_include_directories(mbed-headers-platform
6+
INTERFACE
7+
${mbed-os_SOURCE_DIR}/platform/include
8+
${mbed-os_SOURCE_DIR}/platform/include/platform
9+
${mbed-os_SOURCE_DIR}/platform/randlib/include/mbed-client-randlib/
10+
${mbed-os_SOURCE_DIR}/platform/randlib/include/
11+
${mbed-os_SOURCE_DIR}/platform/mbed-trace/include
12+
)
13+
14+
add_library(mbed-stubs-platform)
15+
target_sources(mbed-stubs-platform
16+
PRIVATE
17+
mbed_critical_stub.c
18+
mbed_atomic_stub.c
19+
mbed_error.c
20+
mbed_poll_stub.cpp
21+
mbed_assert_stub.cpp
22+
mbed_wait_api_stub.cpp
23+
mbed_retarget_stub.cpp
24+
FileHandle_stub.cpp
25+
nvic_wrapper_stub.c
26+
randLIB_stub.c
27+
randLIB_stub.cpp
28+
)
29+
target_include_directories(mbed-stubs-platform
30+
PUBLIC
31+
.
32+
)
33+
target_link_libraries(mbed-stubs-platform
34+
PUBLIC
35+
mbed-headers-base
36+
mbed-headers-hal
37+
mbed-headers-platform
38+
)

0 commit comments

Comments
 (0)