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.
pull/14896/head
Rajkumar Kanagaraj 2021-07-08 04:24:24 -07:00
parent f37b0c485b
commit d95bf96bbf
9 changed files with 30 additions and 35 deletions

View File

@ -48,13 +48,10 @@ target_include_directories(mbed-stubs-headers
.
)
add_subdirectory(connectivity)
add_library(mbed-stubs INTERFACE)
target_link_libraries(mbed-stubs
INTERFACE
mbed-stubs-connectivity
mbed-stubs-drivers
mbed-stubs-events
mbed-stubs-hal

View File

@ -1,32 +0,0 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
add_library(mbed-stubs-connectivity)
target_compile_definitions(mbed-stubs-connectivity
PRIVATE
DEVICE_SERIAL=1
DEVICE_INTERRUPTIN=1
MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200
MBED_CONF_LORA_OVER_THE_AIR_ACTIVATION=true
MBED_CONF_LORA_AUTOMATIC_UPLINK_MESSAGE=true
MBED_CONF_LORA_TX_MAX_SIZE=255
MBED_CONF_CELLULAR_AT_HANDLER_BUFFER_SIZE=32
MDMTXD=NC
MDMRXD=NC
)
target_sources(mbed-stubs-connectivity
PRIVATE
ip4tos_stub.c
stoip4_stub.c
)
target_link_libraries(mbed-stubs-connectivity
PRIVATE
mbed-headers
mbed-stubs-headers
mbed-stubs-rtos
mbed-stubs-platform
gtest
)

View File

@ -42,4 +42,5 @@ else()
add_subdirectory(lorawan)
add_subdirectory(netsocket)
add_subdirectory(mbedtls)
add_subdirectory(libraries)
endif()

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()
add_subdirectory(mbed-coap)
add_subdirectory(nanostack-libservice)
add_subdirectory(ppp)

View File

@ -0,0 +1 @@
*

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

@ -0,0 +1,20 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
add_library(mbed-stubs-nanostack-libservice)
target_sources(mbed-stubs-nanostack-libservice
PRIVATE
ip4tos_stub.c
stoip4_stub.c
)
target_link_libraries(mbed-stubs-nanostack-libservice
PRIVATE
mbed-stubs-rtos-headers
mbed-headers
mbed-stubs-headers
mbed-stubs-rtos
mbed-stubs-platform
gtest
)