CMake: turn mbed_greentea_add_test() into a function

Unlike a macro, a function is more self-contained and can return
early if necessary.
pull/14902/head
Lingkai Dong 2021-07-23 13:27:27 +01:00
parent 159f8325c5
commit e60ffed6f4
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ endif()
# HOST_TESTS_DIR ${CMAKE_CURRENT_LIST_DIR}/host_tests
# )
macro(mbed_greentea_add_test)
function(mbed_greentea_add_test)
set(options)
set(singleValueArgs TEST_NAME)
set(multipleValueArgs
@ -119,4 +119,4 @@ macro(mbed_greentea_add_test)
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
endmacro()
endfunction()