mirror of https://github.com/ARMmbed/mbed-os.git
CMake: connectivity: Unify checks for unit and greentea tests
Subdirectories should always be included in the CMake "all" target when building any tests, either unit tests or greentea tests.pull/15096/head
parent
d954841983
commit
c01d417ed4
|
|
@ -24,7 +24,15 @@ add_library(mbed-nfc INTERFACE)
|
|||
add_library(mbed-ppp INTERFACE)
|
||||
add_library(mbed-wifi INTERFACE)
|
||||
|
||||
if(${CMAKE_CROSSCOMPILING})
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||
# Add these subdirectories for tests
|
||||
add_subdirectory(cellular)
|
||||
add_subdirectory(FEATURE_BLE)
|
||||
add_subdirectory(libraries)
|
||||
add_subdirectory(lorawan)
|
||||
add_subdirectory(mbedtls)
|
||||
add_subdirectory(netsocket)
|
||||
else()
|
||||
# The directories below contain optional target libraries
|
||||
add_subdirectory(FEATURE_BLE EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(cellular EXCLUDE_FROM_ALL)
|
||||
|
|
@ -36,12 +44,4 @@ if(${CMAKE_CROSSCOMPILING})
|
|||
add_subdirectory(nanostack EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(netsocket EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(nfc EXCLUDE_FROM_ALL)
|
||||
else()
|
||||
# Add these subdirectories for the Unit test
|
||||
add_subdirectory(cellular)
|
||||
add_subdirectory(lorawan)
|
||||
add_subdirectory(netsocket)
|
||||
add_subdirectory(mbedtls)
|
||||
add_subdirectory(libraries)
|
||||
add_subdirectory(FEATURE_BLE)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in New Issue