mirror of https://github.com/ARMmbed/mbed-os.git
CMake: connectivity: Guard unit test directories
When unit tests or unit test stubs get added as CMake targets, they becomes part of the "all" target and get compiled when building the whole project. When building greentea tests we need to disable unit tests and stubs to avoid unnecessary compilation and errors.pull/15096/head
parent
c01d417ed4
commit
db8852c5d8
|
@ -2,8 +2,10 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||
if(NOT BUILD_GREENTEA_TESTS)
|
||||
add_subdirectory(tests/UNITTESTS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(libraries)
|
||||
add_subdirectory(source)
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||
if(NOT BUILD_GREENTEA_TESTS)
|
||||
add_subdirectory(tests/UNITTESTS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(mbed-coap)
|
||||
add_subdirectory(nanostack-libservice)
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||
if(NOT BUILD_GREENTEA_TESTS)
|
||||
add_subdirectory(tests/UNITTESTS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(mbed-mbedtls
|
||||
INTERFACE
|
||||
|
|
Loading…
Reference in New Issue