Skip to content

Commit d95bf96

Browse files
committed
CMake: Move nanostack libservice stubs to the connectivity/libraries dir
Move the connectivity nanostack-libservice stubs into the connectivity/libraries directory where the nanostack libservice component present as nanostack libservice source copied from the external repo. So we can avoid duplicating the mbed-os source tree in a central UNITTESTS folder.
1 parent f37b0c4 commit d95bf96

File tree

9 files changed

+30
-35
lines changed

9 files changed

+30
-35
lines changed

UNITTESTS/stubs/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,10 @@ target_include_directories(mbed-stubs-headers
4848
.
4949
)
5050

51-
add_subdirectory(connectivity)
52-
5351
add_library(mbed-stubs INTERFACE)
5452

5553
target_link_libraries(mbed-stubs
5654
INTERFACE
57-
mbed-stubs-connectivity
5855
mbed-stubs-drivers
5956
mbed-stubs-events
6057
mbed-stubs-hal

UNITTESTS/stubs/connectivity/CMakeLists.txt

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

connectivity/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ else()
4242
add_subdirectory(lorawan)
4343
add_subdirectory(netsocket)
4444
add_subdirectory(mbedtls)
45+
add_subdirectory(libraries)
4546
endif()

connectivity/libraries/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
5+
add_subdirectory(tests/UNITTESTS)
6+
endif()
7+
48
add_subdirectory(mbed-coap)
59
add_subdirectory(nanostack-libservice)
610
add_subdirectory(ppp)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(doubles)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_library(mbed-stubs-nanostack-libservice)
5+
6+
target_sources(mbed-stubs-nanostack-libservice
7+
PRIVATE
8+
ip4tos_stub.c
9+
stoip4_stub.c
10+
)
11+
12+
target_link_libraries(mbed-stubs-nanostack-libservice
13+
PRIVATE
14+
mbed-stubs-rtos-headers
15+
mbed-headers
16+
mbed-stubs-headers
17+
mbed-stubs-rtos
18+
mbed-stubs-platform
19+
gtest
20+
)

0 commit comments

Comments
 (0)