Merge pull request #14876 from rwalton-arm/mbed_path_greentea

CMake: greentea: Remove dependency on global MBED_PATH
pull/14874/head
Martin Kojtal 2021-07-06 13:30:25 +02:00 committed by GitHub
commit 80ce06fb67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 7 deletions

View File

@ -1,9 +1,9 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "")
include(${CMAKE_CURRENT_LIST_DIR}/app.cmake) include(${CMAKE_CURRENT_LIST_DIR}/app.cmake)
set(MBED_ROOT ${CMAKE_CURRENT_LIST_DIR}/../.. CACHE INTERNAL "")
# CMake Macro for generalizing CMake configuration across the greentea test suite with configurable parameters # CMake Macro for generalizing CMake configuration across the greentea test suite with configurable parameters
# Macro args: # Macro args:
@ -34,16 +34,13 @@ macro(mbed_greentea_add_test)
"${multipleValueArgs}" "${multipleValueArgs}"
${ARGN} ${ARGN}
) )
add_subdirectory(${MBED_ROOT} build)
add_subdirectory(${MBED_PATH} build)
add_executable(${MBED_GREENTEA_TEST_NAME}) add_executable(${MBED_GREENTEA_TEST_NAME})
# Explicitly enable BUILD_TESTING until CTest is added to the Greentea client # Explicitly enable BUILD_TESTING until CTest is added to the Greentea client
set(BUILD_TESTING ON) set(BUILD_TESTING ON)
mbed_configure_app_target(${MBED_GREENTEA_TEST_NAME})
target_include_directories(${MBED_GREENTEA_TEST_NAME} target_include_directories(${MBED_GREENTEA_TEST_NAME}
PRIVATE PRIVATE
. .