From ad18cc88a617e231b6ed65781437ef4db3ef9e70 Mon Sep 17 00:00:00 2001 From: Rajkumar Kanagaraj Date: Mon, 13 Sep 2021 13:12:06 +0100 Subject: [PATCH] CMake: Fix platform wait_ns greentea test Cmake Mbed CLI 2 generates TARGET_ARM_FM macro as a string in mbed_config.cmake under the MBED_TARGET_DEFINITIONS list. Fix the "if defined" check for TARGET_ARM_FM by searching for the TARGET_ARM_FM string in the MBED_TARGET_DEFINITIONS list. This allows us to skip or include the test from CMake. --- platform/tests/TESTS/mbed_platform/wait_ns/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/tests/TESTS/mbed_platform/wait_ns/CMakeLists.txt b/platform/tests/TESTS/mbed_platform/wait_ns/CMakeLists.txt index 9c671f526b..7b35c11b5c 100644 --- a/platform/tests/TESTS/mbed_platform/wait_ns/CMakeLists.txt +++ b/platform/tests/TESTS/mbed_platform/wait_ns/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(DEFINED TARGET_ARM_FM) +if("TARGET_ARM_FM" IN_LIST MBED_TARGET_DEFINITIONS) set(TEST_SKIPPED "Wait ns test not supported.") endif()