Enable psa-acs pre-fetching support
psa-acs added support for using pre-fetched QCBOR source code. Adapt
the TS build system to allow using this feature.
Change-Id: I9c7019d3ad2f522ad2ebeda79c447f25a82f1bfe
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/external/psa_arch_tests/psa-arch-test-init-cache.cmake.in b/external/psa_arch_tests/psa-arch-test-init-cache.cmake.in
new file mode 100644
index 0000000..cccc78a
--- /dev/null
+++ b/external/psa_arch_tests/psa-arch-test-init-cache.cmake.in
@@ -0,0 +1,27 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+set(CMAKE_INSTALL_PREFIX "@PSA_ARCH_TESTS_INSTALL_PATH@" CACHE STRING "")
+set(CMAKE_TOOLCHAIN_FILE "@TS_EXTERNAL_LIB_TOOLCHAIN_FILE@" CACHE STRING "")
+
+set(TOOLCHAIN INHERIT CACHE STRING "")
+set(PSA_INCLUDE_PATHS "@PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS@" CACHE STRING "")
+set(SUITE "@TS_ARCH_TEST_SUITE@" CACHE STRING "")
+set(ARCH_TEST_EXTERNAL_DEFS "@PSA_ARCH_TEST_EXTERNAL_DEFS@" CACHE STRING "")
+set(CMAKE_VERBOSE_MAKEFILE OFF CACHE BOOL "")
+set(TARGET "tgt_dev_apis_linux" CACHE STRING "")
+
+# Pass comand line paramter passed to the TS deployment configuration time over to psa-acs build.
+if(NOT "@PSA_TARGET_QCBOR@" STREQUAL "")
+ set(PSA_TARGET_QCBOR "@PSA_TARGET_QCBOR@" CACHE PATH "QCBOR source location for psa-acs.")
+endif()
+
+# Allow setting the QCBOR source-code location for psa-acs in the environment
+# Get the value during psa-acs build from the environment if present.
+if (DEFINED ENV{PSA_TARGET_QCBOR})
+ set(PSA_TARGET_QCBOR $ENV{PSA_TARGET_QCBOR} CACHE PATH "QCBOR source location for psa-acs.")
+endif()