blob: b26a0fde98f172c0bae8acc30108857d47178f3d [file] [log] [blame]
Raef Coles19715382020-07-10 09:50:17 +01001#-------------------------------------------------------------------------------
2# Copyright (c) 2020, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8include(FetchContent)
9set(FETCHCONTENT_QUIET FALSE)
10
11# Set to not download submodules if that option is available
12if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
13 cmake_policy(SET CMP0097 NEW)
14endif()
15
16if ("${TFM_TEST_REPO_PATH}" STREQUAL "DOWNLOAD")
17 FetchContent_Declare(tfm_test_repo
18 GIT_REPOSITORY https://git.trustedfirmware.org/TF-M/tf-m-tests.git
Raef Coles9c2ce9b2020-10-22 13:07:12 +010019 GIT_TAG ${TFM_TEST_REPO_VERSION}
Raef Coles19715382020-07-10 09:50:17 +010020 GIT_SHALLOW TRUE
21 GIT_PROGRESS TRUE
22 )
23
24 FetchContent_GetProperties(tfm_test_repo)
25 if(NOT tfm_test_repo_POPULATED)
26 FetchContent_Populate(tfm_test_repo)
27 set(TFM_TEST_REPO_PATH ${tfm_test_repo_SOURCE_DIR} CACHE PATH "Path to TFM-TEST repo (or DOWNLOAD to fetch automatically" FORCE)
28 endif()
29endif()
30
31if ("${CMSIS_5_PATH}" STREQUAL DOWNLOAD)
32 set(CMSIS_5_PATH ${TFM_TEST_REPO_PATH}/CMSIS CACHE PATH "Path to CMSIS_5 (or DOWNLOAD to fetch automatically" FORCE)
33endif()
34
35if (NOT TFM_APP_PATH)
36 set(TFM_APP_PATH ${TFM_TEST_REPO_PATH}/app CACHE PATH "Path to TFM NS app" FORCE)
37endif()
38
39if (NOT TFM_TEST_PATH)
40 set(TFM_TEST_PATH ${TFM_TEST_REPO_PATH}/test CACHE PATH "Path to TFM tests" FORCE)
41endif()
Kevin Pengca4846e2020-10-20 17:50:20 +080042
43if (NOT TFM_NS_LOG_PATH)
44 set(TFM_NS_LOG_PATH ${TFM_TEST_REPO_PATH}/log CACHE PATH "Path to NS log" FORCE)
45endif()