1
1
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
2
2
# SPDX-License-Identifier: Apache-2.0
3
-
4
3
set (MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "" )
5
4
6
5
include (${CMAKE_CURRENT_LIST_DIR} /app.cmake )
6
+ set (MBED_ROOT ${CMAKE_CURRENT_LIST_DIR} /../.. CACHE INTERNAL "" )
7
7
8
8
# CMake Macro for generalizing CMake configuration across the greentea test suite with configurable parameters
9
9
# Macro args:
10
10
# TEST_NAME - Test suite name
11
11
# TEST_INCLUDE_DIRS - Test suite include directories for the test
12
12
# TEST_SOURCES - Test suite sources
13
13
# TEST_REQUIRED_LIBS - Test suite required libraries
14
- #
14
+ #
15
15
# calling the macro:
16
16
# mbed_greentea_add_test(
17
17
# TEST_NAME mbed-platform-system-reset
@@ -34,16 +34,13 @@ macro(mbed_greentea_add_test)
34
34
"${multipleValueArgs} "
35
35
${ARGN}
36
36
)
37
-
38
- add_subdirectory (${MBED_PATH} build )
37
+ add_subdirectory (${MBED_ROOT} build )
39
38
40
39
add_executable (${MBED_GREENTEA_TEST_NAME} )
41
40
42
41
# Explicitly enable BUILD_TESTING until CTest is added to the Greentea client
43
42
set (BUILD_TESTING ON )
44
43
45
- mbed_configure_app_target (${MBED_GREENTEA_TEST_NAME} )
46
-
47
44
target_include_directories (${MBED_GREENTEA_TEST_NAME}
48
45
PRIVATE
49
46
.
@@ -59,7 +56,7 @@ macro(mbed_greentea_add_test)
59
56
# For example:
60
57
# - To select mbed-os library, use cmake with -DMBED_TEST_LINK_LIBRARIES=mbed-os
61
58
# - To select baremetal library, use cmake with -DMBED_TEST_LINK_LIBRARIES=mbed-baremetal
62
- # - To select baremetal with extra external error logging library to the test, use cmake with
59
+ # - To select baremetal with extra external error logging library to the test, use cmake with
63
60
# -D "MBED_TEST_LINK_LIBRARIES=mbed-baremetal ext-errorlogging"
64
61
if (DEFINED MBED_TEST_LINK_LIBRARIES )
65
62
separate_arguments (MBED_TEST_LINK_LIBRARIES )
0 commit comments