blob: 9c2e778db6d0b279c195e655abea82e95365e3e7 [file] [log] [blame]
Julian Halldd296222021-05-27 15:31:32 +01001#-------------------------------------------------------------------------------
2# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8#-------------------------------------------------------------------------------
9# The base build file shared between deployments of 'ts-arch-test' for
10# different environments. Used for running PSA arch tests.
11#-------------------------------------------------------------------------------
12
13#-------------------------------------------------------------------------------
14# Use libts for locating and accessing services. An appropriate version of
15# libts will be imported for the enviroment in which service tests are
16# deployed.
17#-------------------------------------------------------------------------------
18include(${TS_ROOT}/deployments/libts/libts-import.cmake)
19target_link_libraries(ts-arch-test PRIVATE libts)
20
21#-------------------------------------------------------------------------------
22# Components that are common accross all deployments
23#
24#-------------------------------------------------------------------------------
25add_components(
26 TARGET "ts-arch-test"
27 BASE_DIR ${TS_ROOT}
28 COMPONENTS
29 "components/app/arch-test-runner"
30 "components/service/common/include"
31)
32
33#-------------------------------------------------------------------------------
34# Export project header paths for arch tests
35#
36#-------------------------------------------------------------------------------
37get_target_property(_include_paths ts-arch-test INCLUDE_DIRECTORIES)
38list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths})
39
40#-------------------------------------------------------------------------------
41# Components used from external projects
42#
43#-------------------------------------------------------------------------------
44
45# psa-arch-tests
46include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake)
47target_link_libraries(ts-arch-test PRIVATE val_nspe test_combine pal_nspe)
48
49#-------------------------------------------------------------------------------
50# Define install content.
51#
52#-------------------------------------------------------------------------------
53if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
54 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
55endif()
56install(TARGETS ts-arch-test RUNTIME DESTINATION ${TS_ENV}/bin)