blob: 3a1e60d17d54d7006dafe2d5117b489bcf8159a8 [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
19 GIT_SHALLOW TRUE
20 GIT_PROGRESS TRUE
21 )
22
23 FetchContent_GetProperties(tfm_test_repo)
24 if(NOT tfm_test_repo_POPULATED)
25 FetchContent_Populate(tfm_test_repo)
26 set(TFM_TEST_REPO_PATH ${tfm_test_repo_SOURCE_DIR} CACHE PATH "Path to TFM-TEST repo (or DOWNLOAD to fetch automatically" FORCE)
27 endif()
28endif()
29
30if ("${CMSIS_5_PATH}" STREQUAL DOWNLOAD)
31 set(CMSIS_5_PATH ${TFM_TEST_REPO_PATH}/CMSIS CACHE PATH "Path to CMSIS_5 (or DOWNLOAD to fetch automatically" FORCE)
32endif()
33
34if (NOT TFM_APP_PATH)
35 set(TFM_APP_PATH ${TFM_TEST_REPO_PATH}/app CACHE PATH "Path to TFM NS app" FORCE)
36endif()
37
38if (NOT TFM_TEST_PATH)
39 set(TFM_TEST_PATH ${TFM_TEST_REPO_PATH}/test CACHE PATH "Path to TFM tests" FORCE)
40endif()
Kevin Pengca4846e2020-10-20 17:50:20 +080041
42if (NOT TFM_NS_LOG_PATH)
43 set(TFM_NS_LOG_PATH ${TFM_TEST_REPO_PATH}/log CACHE PATH "Path to NS log" FORCE)
44endif()