Skip to content

Commit e60ffed

Browse files
committed
CMake: turn mbed_greentea_add_test() into a function
Unlike a macro, a function is more self-contained and can return early if necessary.
1 parent 159f832 commit e60ffed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/cmake/mbed_greentea.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif()
3030
# HOST_TESTS_DIR ${CMAKE_CURRENT_LIST_DIR}/host_tests
3131
# )
3232

33-
macro(mbed_greentea_add_test)
33+
function(mbed_greentea_add_test)
3434
set(options)
3535
set(singleValueArgs TEST_NAME)
3636
set(multipleValueArgs
@@ -119,4 +119,4 @@ macro(mbed_greentea_add_test)
119119
set(CMAKE_VERBOSE_MAKEFILE ON)
120120
endif()
121121

122-
endmacro()
122+
endfunction()

0 commit comments

Comments
 (0)