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 | #------------------------------------------------------------------------------- |
| 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 | #------------------------------------------------------------------------------- |
| 18 | include(${TS_ROOT}/deployments/libts/libts-import.cmake) |
| 19 | target_link_libraries(ts-arch-test PRIVATE libts) |
| 20 | |
| 21 | #------------------------------------------------------------------------------- |
| 22 | # Components that are common accross all deployments |
| 23 | # |
| 24 | #------------------------------------------------------------------------------- |
| 25 | add_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 | #------------------------------------------------------------------------------- |
| 37 | get_target_property(_include_paths ts-arch-test INCLUDE_DIRECTORIES) |
| 38 | list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths}) |
| 39 | |
| 40 | #------------------------------------------------------------------------------- |
| 41 | # Components used from external projects |
| 42 | # |
| 43 | #------------------------------------------------------------------------------- |
| 44 | |
| 45 | # psa-arch-tests |
| 46 | include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake) |
| 47 | target_link_libraries(ts-arch-test PRIVATE val_nspe test_combine pal_nspe) |
| 48 | |
| 49 | #------------------------------------------------------------------------------- |
| 50 | # Define install content. |
| 51 | # |
| 52 | #------------------------------------------------------------------------------- |
| 53 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 54 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 55 | endif() |
| 56 | install(TARGETS ts-arch-test RUNTIME DESTINATION ${TS_ENV}/bin) |