Skip to content

Commit b73b38a

Browse files
committed
CMake: unit-tests: Make platform stub only depend on headers it uses
Previously the platform stub library depended on `mbed-headers`, which is a collection of all available headers in mbed-os. To make it easier to separate the library, only depend on the headers we're actually using.
1 parent e270474 commit b73b38a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

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
)

platform/tests/UNITTESTS/CircularBuffer/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ target_sources(${TEST_NAME}
1212

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

platform/tests/UNITTESTS/doubles/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ target_link_options(mbed-stubs-platform
3131
--coverage
3232
)
3333
target_link_libraries(mbed-stubs-platform
34-
PRIVATE
35-
mbed-headers
34+
PUBLIC
35+
mbed-headers-base
36+
mbed-headers-hal
37+
mbed-headers-platform
3638
mbed-stubs-headers
3739
)

0 commit comments

Comments
 (0)