Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 9 | # The base build file shared between deployments of 'psa-api-test' for |
| 10 | # different environments. Used for running PSA API tests. |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 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 | #------------------------------------------------------------------------------- |
| 18 | include(${TS_ROOT}/deployments/libts/libts-import.cmake) |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 19 | target_link_libraries(psa-api-test PRIVATE libts) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 20 | |
| 21 | #------------------------------------------------------------------------------- |
| 22 | # Components that are common accross all deployments |
| 23 | # |
| 24 | #------------------------------------------------------------------------------- |
| 25 | add_components( |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 26 | TARGET "psa-api-test" |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 27 | BASE_DIR ${TS_ROOT} |
| 28 | COMPONENTS |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 29 | "components/common/tlv" |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 30 | "components/service/common/include" |
| 31 | ) |
| 32 | |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 33 | target_sources(psa-api-test PRIVATE |
| 34 | ${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c |
| 35 | ) |
| 36 | |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 37 | #------------------------------------------------------------------------------- |
| 38 | # Export project header paths for arch tests |
| 39 | # |
| 40 | #------------------------------------------------------------------------------- |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 41 | get_target_property(_include_paths psa-api-test INCLUDE_DIRECTORIES) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 42 | list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths}) |
| 43 | |
| 44 | #------------------------------------------------------------------------------- |
| 45 | # Components used from external projects |
| 46 | # |
| 47 | #------------------------------------------------------------------------------- |
| 48 | |
| 49 | # psa-arch-tests |
| 50 | include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake) |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 51 | target_link_libraries(psa-api-test PRIVATE val_nspe test_combine pal_nspe) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 52 | |
| 53 | #------------------------------------------------------------------------------- |
| 54 | # Define install content. |
| 55 | # |
| 56 | #------------------------------------------------------------------------------- |
| 57 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 58 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 59 | endif() |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 60 | install(TARGETS psa-api-test RUNTIME DESTINATION ${TS_ENV}/bin) |