diff --git a/storage/blockdevice/COMPONENT_QSPIF/CMakeLists.txt b/storage/blockdevice/COMPONENT_QSPIF/CMakeLists.txt index f92553fe98..54b7d11b37 100644 --- a/storage/blockdevice/COMPONENT_QSPIF/CMakeLists.txt +++ b/storage/blockdevice/COMPONENT_QSPIF/CMakeLists.txt @@ -13,5 +13,7 @@ target_sources(mbed-storage-qspif ) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(UNITTESTS) + if (NOT BUILD_GREENTEA_TESTS) + add_subdirectory(UNITTESTS) + endif() endif()