Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gabor Toth | 6df91b5 | 2023-05-15 14:17:16 +0200 | [diff] [blame] | 2 | # Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 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 | #------------------------------------------------------------------------------- |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame] | 14 | # Components that are common across all deployments |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 15 | # |
| 16 | #------------------------------------------------------------------------------- |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 17 | |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 18 | target_sources(${PROJECT_NAME} PRIVATE |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 19 | ${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c |
| 20 | ) |
| 21 | |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 22 | #------------------------------------------------------------------------------- |
Gabor Toth | ee2e7cb | 2024-10-07 17:02:56 +0200 | [diff] [blame] | 23 | # Use libpsats for locating PSA services. An appropriate version of |
| 24 | # libpsats will be imported for the environment. Making sure the link order is |
Gabor Toth | 6df91b5 | 2023-05-15 14:17:16 +0200 | [diff] [blame] | 25 | # correct. |
| 26 | #------------------------------------------------------------------------------- |
Gabor Toth | 76909ad | 2024-09-25 15:23:21 +0200 | [diff] [blame] | 27 | if (COVERAGE) |
Gabor Toth | ee2e7cb | 2024-10-07 17:02:56 +0200 | [diff] [blame] | 28 | set(LIBPSATS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsats build type" FORCE) |
Gabor Toth | 76909ad | 2024-09-25 15:23:21 +0200 | [diff] [blame] | 29 | set(LIBTS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libts build type" FORCE) |
| 30 | endif() |
| 31 | |
Gabor Toth | ee2e7cb | 2024-10-07 17:02:56 +0200 | [diff] [blame] | 32 | include(${TS_ROOT}/deployments/libpsats/libpsats-import.cmake) |
| 33 | target_link_libraries( ${PROJECT_NAME} PRIVATE libpsats::psats) |
Gabor Toth | 6df91b5 | 2023-05-15 14:17:16 +0200 | [diff] [blame] | 34 | |
| 35 | target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe) |
| 36 | |
| 37 | #------------------------------------------------------------------------------- |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 38 | # Export project header paths for arch tests |
| 39 | # |
| 40 | #------------------------------------------------------------------------------- |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 41 | get_target_property(_include_paths ${PROJECT_NAME} 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}) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 43 | include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 44 | |
| 45 | #------------------------------------------------------------------------------- |
| 46 | # Define install content. |
| 47 | # |
| 48 | #------------------------------------------------------------------------------- |
| 49 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 50 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 51 | endif() |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 52 | install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${TS_ENV}/bin) |