blob: 0a84c657ff469e4f07c0cc231d3e894d9cf086c1 [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#-------------------------------------------------------------------------------
Julian Halld4071382021-07-07 16:45:53 +01009# The base build file shared between deployments of 'psa-api-test' for
10# different environments. Used for running PSA API tests.
Julian Halldd296222021-05-27 15:31:32 +010011#-------------------------------------------------------------------------------
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)
Julian Halld4071382021-07-07 16:45:53 +010019target_link_libraries(psa-api-test PRIVATE libts)
Julian Halldd296222021-05-27 15:31:32 +010020
21#-------------------------------------------------------------------------------
22# Components that are common accross all deployments
23#
24#-------------------------------------------------------------------------------
25add_components(
Julian Halld4071382021-07-07 16:45:53 +010026 TARGET "psa-api-test"
Julian Halldd296222021-05-27 15:31:32 +010027 BASE_DIR ${TS_ROOT}
28 COMPONENTS
Julian Halld4071382021-07-07 16:45:53 +010029 "components/common/tlv"
Julian Hall99a57e32021-07-28 14:18:50 +010030 "components/service/common/client"
Julian Halldd296222021-05-27 15:31:32 +010031 "components/service/common/include"
Julian Hall04460402021-07-08 17:40:57 +010032 "components/rpc/common/caller"
33 "components/rpc/common/logging"
Julian Halldd296222021-05-27 15:31:32 +010034)
35
Julian Halld4071382021-07-07 16:45:53 +010036target_sources(psa-api-test PRIVATE
37 ${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c
38)
39
Julian Halldd296222021-05-27 15:31:32 +010040#-------------------------------------------------------------------------------
41# Export project header paths for arch tests
42#
43#-------------------------------------------------------------------------------
Julian Halld4071382021-07-07 16:45:53 +010044get_target_property(_include_paths psa-api-test INCLUDE_DIRECTORIES)
Julian Halldd296222021-05-27 15:31:32 +010045list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths})
46
47#-------------------------------------------------------------------------------
48# Components used from external projects
49#
50#-------------------------------------------------------------------------------
51
52# psa-arch-tests
53include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake)
Julian Halld4071382021-07-07 16:45:53 +010054target_link_libraries(psa-api-test PRIVATE val_nspe test_combine pal_nspe)
Julian Halldd296222021-05-27 15:31:32 +010055
56#-------------------------------------------------------------------------------
57# Define install content.
58#
59#-------------------------------------------------------------------------------
60if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
61 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
62endif()
Julian Halld4071382021-07-07 16:45:53 +010063install(TARGETS psa-api-test RUNTIME DESTINATION ${TS_ENV}/bin)