Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 1 | #/** @file |
Purvi Mehta | 6936e25 | 2021-05-21 21:06:13 +0800 | [diff] [blame] | 2 | # * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved. |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 3 | # * SPDX-License-Identifier : Apache-2.0 |
| 4 | # * |
| 5 | # * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # * you may not use this file except in compliance with the License. |
| 7 | # * You may obtain a copy of the License at |
| 8 | # * |
| 9 | # * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # * |
| 11 | # * Unless required by applicable law or agreed to in writing, software |
| 12 | # * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # * See the License for the specific language governing permissions and |
| 15 | # * limitations under the License. |
| 16 | #**/ |
| 17 | |
| 18 | # Set the minimum required version of CMake for the project |
| 19 | cmake_minimum_required(VERSION 3.10) |
| 20 | |
| 21 | # cmake_policy |
| 22 | cmake_policy(SET CMP0057 NEW) |
| 23 | |
| 24 | # Find python interpreter version 3 or greater |
| 25 | find_package(PythonInterp 3 REQUIRED) |
| 26 | # Find Git package |
| 27 | find_package(Git REQUIRED) |
| 28 | |
| 29 | get_filename_component(PSA_ROOT_DIR . ABSOLUTE) |
| 30 | |
Lingkai Dong | 9d4e7df | 2021-01-13 16:57:54 +0000 | [diff] [blame] | 31 | include(${PSA_ROOT_DIR}/tools/cmake/common/Utils.cmake) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 32 | include(${PSA_ROOT_DIR}/tools/cmake/common/CMakeSettings.cmake) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 33 | include(${PSA_ROOT_DIR}/tools/cmake/common/CMakeExternal.cmake) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 34 | |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 35 | if(NOT DEFINED TFM_PROFILE) |
| 36 | message(STATUS "[PSA] : Building Default profile") |
| 37 | list(APPEND PSA_SUITES |
| 38 | "IPC" |
| 39 | "CRYPTO" |
| 40 | "INTERNAL_TRUSTED_STORAGE" |
| 41 | "PROTECTED_STORAGE" |
| 42 | "STORAGE" |
| 43 | "INITIAL_ATTESTATION" |
| 44 | ) |
| 45 | else() |
| 46 | |
| 47 | if("${TFM_PROFILE}" STREQUAL "profile_small") |
| 48 | # list of supported suites |
| 49 | list(APPEND PSA_SUITES |
| 50 | "CRYPTO" |
| 51 | "INTERNAL_TRUSTED_STORAGE" |
| 52 | "INITIAL_ATTESTATION" |
| 53 | ) |
| 54 | else() |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 55 | # list of supported suites |
| 56 | list(APPEND PSA_SUITES |
| 57 | "IPC" |
| 58 | "CRYPTO" |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 59 | "INTERNAL_TRUSTED_STORAGE" |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 60 | "PROTECTED_STORAGE" |
Vinay Kumar Kotegowder | 18fcd40 | 2020-04-27 17:38:41 +0530 | [diff] [blame] | 61 | "STORAGE" |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 62 | "INITIAL_ATTESTATION" |
| 63 | ) |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 64 | endif() |
| 65 | endif() |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 66 | # list of ipc files required |
| 67 | list(APPEND PSA_IPC_FILES |
| 68 | "psa/client.h" |
| 69 | "psa/service.h" |
Jaykumar Pitambarbhai Patel | 1c2b028 | 2019-11-06 11:29:13 +0530 | [diff] [blame] | 70 | "psa/lifecycle.h" |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 71 | "psa_manifest/sid.h" |
| 72 | "psa_manifest/pid.h" |
Jaykumar Pitambarbhai Patel | 1c2b028 | 2019-11-06 11:29:13 +0530 | [diff] [blame] | 73 | "psa_manifest/driver_partition_psa.h" |
| 74 | "psa_manifest/client_partition_psa.h" |
| 75 | "psa_manifest/server_partition_psa.h" |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 76 | ) |
| 77 | |
| 78 | # list of crypto files required |
| 79 | list(APPEND PSA_CRYPTO_FILES |
| 80 | "psa/crypto.h" |
| 81 | ) |
| 82 | |
| 83 | # list of protected_storage files required |
| 84 | list(APPEND PSA_PROTECTED_STORAGE_FILES |
| 85 | "psa/protected_storage.h" |
| 86 | ) |
| 87 | |
| 88 | # list of internal_trusted_storage files required |
| 89 | list(APPEND PSA_INTERNAL_TRUSTED_STORAGE_FILES |
| 90 | "psa/internal_trusted_storage.h" |
| 91 | ) |
| 92 | |
Vinay Kumar Kotegowder | 18fcd40 | 2020-04-27 17:38:41 +0530 | [diff] [blame] | 93 | # list of storage files required |
| 94 | list(APPEND PSA_STORAGE_FILES |
| 95 | ${PSA_INTERNAL_TRUSTED_STORAGE_FILES} |
| 96 | ${PSA_PROTECTED_STORAGE_FILES} |
| 97 | ) |
| 98 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 99 | # list of initial_attestation files required |
| 100 | list(APPEND PSA_INITIAL_ATTESTATION_FILES |
| 101 | "psa/initial_attestation.h" |
| 102 | "psa/crypto.h" |
| 103 | ) |
| 104 | |
| 105 | # list of supported toolchains |
| 106 | list(APPEND PSA_TOOLCHAIN_SUPPORT |
| 107 | GNUARM |
| 108 | ARMCLANG |
| 109 | HOST_GCC |
jotman01 | bed7a15 | 2021-05-25 22:57:17 +0800 | [diff] [blame] | 110 | GCC_LINUX |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 111 | ) |
| 112 | |
Øyvind Rønningstad | c50804e | 2021-03-12 12:43:25 +0100 | [diff] [blame] | 113 | # list of supported CROSS_COMPILE toolchains |
| 114 | list(APPEND CROSS_COMPILE_TOOLCHAIN_SUPPORT |
| 115 | GNUARM |
| 116 | ) |
| 117 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 118 | # list of suported CPU arch |
| 119 | list(APPEND PSA_CPU_ARCH_SUPPORT |
| 120 | armv8m_ml |
| 121 | armv8m_bl |
| 122 | armv7m |
jotman01 | bed7a15 | 2021-05-25 22:57:17 +0800 | [diff] [blame] | 123 | armv8a |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 124 | ) |
| 125 | |
| 126 | # list of VERBOSE options |
| 127 | list(APPEND PSA_VERBOSE_OPTIONS 1 2 3 4 5) |
| 128 | |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 129 | # list of PLATFORM_PSA_ISOLATION_LEVEL options |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 130 | if("${TFM_PROFILE}" STREQUAL "profile_medium") |
| 131 | list(APPEND PLATFORM_PSA_ISOLATION_LEVEL_OPTIONS 1 2) |
| 132 | else() |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 133 | list(APPEND PLATFORM_PSA_ISOLATION_LEVEL_OPTIONS 1 2 3) |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 134 | endif() |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 135 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 136 | message(STATUS "[PSA] : ----------Process input arguments- start-------------") |
| 137 | |
| 138 | # Check for TARGET command line argument |
| 139 | _check_arguments("TARGET") |
| 140 | # Check for SUTIE command line argument |
| 141 | _check_arguments("SUITE") |
| 142 | # Check for PSA_INCLUDE_PATHS command line argument |
| 143 | _check_arguments("PSA_INCLUDE_PATHS") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 144 | |
| 145 | string(TOLOWER ${SUITE} SUITE_LOWER) |
| 146 | |
| 147 | # Check for valid targets |
| 148 | _get_sub_dir_list(PSA_TARGET_LIST ${PSA_ROOT_DIR}/platform/targets) |
| 149 | if(NOT ${TARGET} IN_LIST PSA_TARGET_LIST) |
Øyvind Rønningstad | abbb727 | 2020-11-09 14:50:54 +0100 | [diff] [blame] | 150 | message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DTARGET=${TARGET}, supported targets are : ${PSA_TARGET_LIST}") |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 151 | else() |
| 152 | message(STATUS "[PSA] : TARGET is set to ${TARGET}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 153 | endif() |
| 154 | |
| 155 | # Check for the presence of required test suite directories |
| 156 | if((NOT IS_DIRECTORY ${PSA_ROOT_DIR}/dev_apis) OR (NOT IS_DIRECTORY ${PSA_ROOT_DIR}/ff)) |
| 157 | message(STATUS "[PSA] : Error: Could not find architecture test suite directories in psa root path ${PSA_ROOT_DIR}") |
| 158 | endif() |
| 159 | |
| 160 | if(FALSE) |
| 161 | # Check for build directory specified |
| 162 | if(NOT DEFINED BUILD) |
| 163 | set(BUILD ${CMAKE_CURRENT_BINARY_DIR}/BUILD CACHE INTERNAL "Defaulting build directory to ${BUILD}" FORCE) |
| 164 | else() |
| 165 | set(BUILD ${CMAKE_CURRENT_BINARY_DIR}/${BUILD}/BUILD CACHE INTERNAL "Defaulting build directory to ${BUILD}" FORCE) |
| 166 | endif() |
| 167 | endif() |
| 168 | |
| 169 | # Check for valid suite cmake argument passed |
| 170 | if(NOT ${SUITE} IN_LIST PSA_SUITES) |
Øyvind Rønningstad | abbb727 | 2020-11-09 14:50:54 +0100 | [diff] [blame] | 171 | message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DSUITE=${SUITE}, select one from supported suites which are : ${PSA_SUITES}") |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 172 | else() |
| 173 | message(STATUS "[PSA] : SUITE is set to ${SUITE}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 174 | endif() |
| 175 | |
| 176 | # Project variables |
| 177 | set(PSA_TARGET_PRE_BUILD psa_pre_build) |
| 178 | set(PSA_TARGET_GENERATE_DATABASE_PRE psa_generate_database_prerequisite) |
| 179 | set(PSA_TARGET_GENERATE_DATABASE psa_generate_database) |
| 180 | set(PSA_TARGET_GENERATE_DATABASE_POST psa_generate_database_cleanup) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 181 | if(${SUITE} STREQUAL "INITIAL_ATTESTATION") |
| 182 | set(PSA_TARGET_QCBOR psa_qcbor) |
| 183 | endif() |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 184 | set(PSA_TARGET_PAL_NSPE_LIB pal_nspe) |
| 185 | set(PSA_TARGET_VAL_NSPE_LIB val_nspe) |
| 186 | set(PSA_TARGET_TEST_COMBINE_LIB test_combine) |
| 187 | set(PSA_TARGET_DRIVER_PARTITION_LIB driver_partition) |
| 188 | set(PSA_TARGET_CLIENT_PARTITION_LIB client_partition) |
| 189 | set(PSA_TARGET_SERVER_PARTITION_LIB server_partition) |
| 190 | if(${SUITE} STREQUAL "IPC") |
| 191 | set(PSA_SUITE_DIR ${PSA_ROOT_DIR}/ff/${SUITE_LOWER}) |
| 192 | set(PSA_SUITE_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/ff/${SUITE_LOWER}) |
Vinay Kumar Kotegowder | 18fcd40 | 2020-04-27 17:38:41 +0530 | [diff] [blame] | 193 | elseif((${SUITE} STREQUAL "INTERNAL_TRUSTED_STORAGE") OR (${SUITE} STREQUAL "PROTECTED_STORAGE")) |
| 194 | set(PSA_SUITE_DIR ${PSA_ROOT_DIR}/dev_apis/storage) |
| 195 | set(PSA_SUITE_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/dev_apis/storage) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 196 | else() |
| 197 | set(PSA_SUITE_DIR ${PSA_ROOT_DIR}/dev_apis/${SUITE_LOWER}) |
| 198 | set(PSA_SUITE_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/dev_apis/${SUITE_LOWER}) |
| 199 | endif() |
| 200 | set(PSA_TARGET_CONFIG_HEADER_GENERATOR ${PSA_ROOT_DIR}/tools/scripts/target_cfg/targetConfigGen.py) |
| 201 | set(PSA_TESTLIST_GENERATOR ${PSA_ROOT_DIR}/tools/scripts/gen_tests_list.py) |
| 202 | set(TARGET_CONFIGURATION_FILE ${PSA_ROOT_DIR}/platform/targets/${TARGET}/target.cfg) |
| 203 | set(TGT_CONFIG_SOURCE_C ${CMAKE_CURRENT_BINARY_DIR}/targetConfigGen.c) |
| 204 | set(OUTPUT_HEADER target_database.h) |
| 205 | set(DATABASE_TABLE_NAME target_database) |
| 206 | set(DATABASE_TABLE_SECTION_NAME "NOSECTION") |
Vinay Kumar Kotegowder | 18fcd40 | 2020-04-27 17:38:41 +0530 | [diff] [blame] | 207 | set(TARGET_HEADER_GEN_INCLUDE_PATHS "${PSA_ROOT_DIR}/val/nspe|${PSA_ROOT_DIR}/val/common|${PSA_ROOT_DIR}/platform/targets/common/nspe|${PSA_ROOT_DIR}/platform/targets/common/nspe/crypto|${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe") |
| 208 | if(${SUITE} STREQUAL "INTERNAL_TRUSTED_STORAGE") |
| 209 | set(TESTSUITE_DB ${PSA_SUITE_DIR}/its_testsuite.db) |
| 210 | elseif((${SUITE} STREQUAL "PROTECTED_STORAGE") OR (${SUITE} STREQUAL "STORAGE")) |
| 211 | set(TESTSUITE_DB ${PSA_SUITE_DIR}/ps_testsuite.db) |
| 212 | else() |
| 213 | set(TESTSUITE_DB ${PSA_SUITE_DIR}/testsuite.db) |
| 214 | endif() |
| 215 | set(PSA_TESTLIST_FILE ${CMAKE_CURRENT_BINARY_DIR}/${SUITE_LOWER}_testlist.txt) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 216 | set(PSA_TEST_ENTRY_LIST_INC ${CMAKE_CURRENT_BINARY_DIR}/test_entry_list.inc) |
| 217 | set(PSA_TEST_ENTRY_FUN_DECLARE_INC ${CMAKE_CURRENT_BINARY_DIR}/test_entry_fn_declare_list.inc) |
| 218 | set(PSA_CLIENT_TEST_LIST_DELCARE_INC ${CMAKE_CURRENT_BINARY_DIR}/client_tests_list_declare.inc) |
| 219 | set(PSA_CLIENT_TEST_LIST_INC ${CMAKE_CURRENT_BINARY_DIR}/client_tests_list.inc) |
| 220 | set(PSA_SERVER_TEST_LIST_DECLARE_INC ${CMAKE_CURRENT_BINARY_DIR}/server_tests_list_declare.inc) |
| 221 | set(PSA_SERVER_TEST_LIST ${CMAKE_CURRENT_BINARY_DIR}/server_tests_list.inc) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 222 | if(${SUITE} STREQUAL "INITIAL_ATTESTATION") |
| 223 | set(PSA_QCBOR_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PSA_TARGET_QCBOR}/inc) |
| 224 | endif() |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 225 | |
| 226 | # Validity check for required files for a given suite |
| 227 | if(NOT DEFINED PSA_${SUITE}_FILES) |
| 228 | message(FATAL_ERROR "[PSA] : List of file/s to verify against ${suite} is not defined") |
| 229 | endif() |
| 230 | foreach(file_item ${PSA_${SUITE}_FILES}) |
| 231 | set(PSA_FILE_FOUND FALSE) |
| 232 | foreach(include_path ${PSA_INCLUDE_PATHS}) |
| 233 | if((EXISTS ${include_path}/${file_item}) AND |
| 234 | (NOT PSA_FILE_FOUND)) |
| 235 | set(PSA_FILE_FOUND TRUE) |
| 236 | break() |
| 237 | endif() |
| 238 | endforeach() |
| 239 | if(NOT PSA_FILE_FOUND) |
| 240 | message(FATAL_ERROR "[PSA] : Couldn't find ${file_item} in ${PSA_INCLUDE_PATHS}") |
| 241 | endif() |
| 242 | endforeach() |
| 243 | |
| 244 | # Check for TOOLCHAIN command line argument |
| 245 | if(NOT DEFINED TOOLCHAIN) |
| 246 | set(TOOLCHAIN "GNUARM" CACHE INTERNAL "Compiler used" FORCE) |
| 247 | message(STATUS "[PSA] : Defaulting compiler to ${TOOLCHAIN}") |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 248 | else() |
| 249 | message(STATUS "[PSA] : TOOLCHAIN is set to ${TOOLCHAIN}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 250 | endif() |
| 251 | |
Gowtham Siddarth | 1d6d469 | 2019-09-16 11:47:29 +0530 | [diff] [blame] | 252 | if(${TOOLCHAIN} STREQUAL "ARMCLANG" OR ${TOOLCHAIN} STREQUAL "GNUARM") |
| 253 | if(NOT DEFINED CPU_ARCH) |
| 254 | message(FATAL_ERROR "[PSA] : Error: -DCPU_ARCH option missing") |
| 255 | else() |
| 256 | # Check for CPU architecture |
| 257 | if(NOT ${CPU_ARCH} IN_LIST PSA_CPU_ARCH_SUPPORT) |
Øyvind Rønningstad | abbb727 | 2020-11-09 14:50:54 +0100 | [diff] [blame] | 258 | message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DCPU_ARCH=${CPU_ARCH}, supported CPU arch are : ${PSA_CPU_ARCH_SUPPORT}") |
Gowtham Siddarth | 1d6d469 | 2019-09-16 11:47:29 +0530 | [diff] [blame] | 259 | endif() |
| 260 | endif() |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 261 | message(STATUS "[PSA] : CPU_ARCH is set to ${CPU_ARCH}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 262 | endif() |
| 263 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 264 | # Check for VERBOSE |
| 265 | if(NOT DEFINED VERBOSE) |
| 266 | set(VERBOSE 3 CACHE INTERNAL "Default VERBOSE value" FORCE) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 267 | message(STATUS "[PSA] : Defaulting VERBOSE to ${VERBOSE}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 268 | else() |
| 269 | if(NOT ${VERBOSE} IN_LIST PSA_VERBOSE_OPTIONS) |
Øyvind Rønningstad | abbb727 | 2020-11-09 14:50:54 +0100 | [diff] [blame] | 270 | message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DVERBOSE=${VERBOSE}, supported values are : ${PSA_VERBOSE_OPTIONS}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 271 | endif() |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 272 | message(STATUS "[PSA] : VERBOSE is set to ${VERBOSE}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 273 | endif() |
| 274 | |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 275 | # Check for PLATFORM_PSA_ISOLATION_LEVEL |
| 276 | if(NOT DEFINED PLATFORM_PSA_ISOLATION_LEVEL) |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 277 | if("${TFM_PROFILE}" STREQUAL "profile_medium") |
| 278 | set(PLATFORM_PSA_ISOLATION_LEVEL 2 CACHE INTERNAL "Default PLATFORM_PSA_ISOLATION_LEVEL value" FORCE) |
| 279 | else() |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 280 | set(PLATFORM_PSA_ISOLATION_LEVEL 3 CACHE INTERNAL "Default PLATFORM_PSA_ISOLATION_LEVEL value" FORCE) |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 281 | endif() |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 282 | if(${SUITE} STREQUAL "IPC") |
| 283 | message(STATUS "[PSA] : Defaulting PLATFORM_PSA_ISOLATION_LEVEL to ${PLATFORM_PSA_ISOLATION_LEVEL}") |
| 284 | endif() |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 285 | else() |
| 286 | if(NOT ${PLATFORM_PSA_ISOLATION_LEVEL} IN_LIST PLATFORM_PSA_ISOLATION_LEVEL_OPTIONS) |
Øyvind Rønningstad | abbb727 | 2020-11-09 14:50:54 +0100 | [diff] [blame] | 287 | message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DPLATFORM_PSA_ISOLATION_LEVEL=${PLATFORM_PSA_ISOLATION_LEVEL}, supported values are : ${PLATFORM_PSA_ISOLATION_LEVEL_OPTIONS}") |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 288 | endif() |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 289 | if(${SUITE} STREQUAL "IPC") |
| 290 | message(STATUS "[PSA] : PLATFORM_PSA_ISOLATION_LEVEL is set to ${PLATFORM_PSA_ISOLATION_LEVEL}") |
| 291 | endif() |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 292 | endif() |
| 293 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 294 | if(NOT DEFINED INCLUDE_PANIC_TESTS) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 295 | #By default panic tests are disabled |
| 296 | set(INCLUDE_PANIC_TESTS 0 CACHE INTERNAL "Default INCLUDE_PANIC_TESTS value" FORCE) |
| 297 | message(STATUS "[PSA] : Defaulting INCLUDE_PANIC_TESTS to ${INCLUDE_PANIC_TESTS}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 298 | else() |
| 299 | if(INCLUDE_PANIC_TESTS EQUAL 1) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 300 | message(STATUS "[PSA] : " |
| 301 | "INCLUDE_PANIC_TESTS set to 1, therefore including PSA APIs panic tests into the regression,\n" |
| 302 | "\tensure that watchdog.num is set to 1 in ${PSA_ROOT_DIR}/platform/targets/${TARGET}/target.cfg") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 303 | endif() |
| 304 | endif() |
| 305 | |
| 306 | if(NOT DEFINED WATCHDOG_AVAILABLE) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 307 | #Assuming watchdog is available to program by test suite |
| 308 | set(WATCHDOG_AVAILABLE 1 CACHE INTERNAL "Default WATCHDOG_AVAILABLE value" FORCE) |
| 309 | message(STATUS "[PSA] : Defaulting WATCHDOG_AVAILABLE to ${WATCHDOG_AVAILABLE}") |
| 310 | else() |
| 311 | message(STATUS "[PSA] : WATCHDOG_AVAILABLE is set to ${WATCHDOG_AVAILABLE}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 312 | endif() |
| 313 | |
| 314 | if((INCLUDE_PANIC_TESTS EQUAL 1) AND |
| 315 | (WATCHDOG_AVAILABLE EQUAL 0)) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 316 | message(WARNING "[PSA]: " |
| 317 | "Note that to test PSA APIs panic conditions, test harness may require to access" |
| 318 | "the watchdog timer in oder to recover from panic and to be able to continue with" |
| 319 | "next test. Ignore this warning if system under test has capability to reset the" |
| 320 | "system when it encounters panic condition.") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 321 | endif() |
| 322 | |
| 323 | if(NOT DEFINED SP_HEAP_MEM_SUPP) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 324 | #Are dynamic memory functions available to secure partition? |
| 325 | set(SP_HEAP_MEM_SUPP 1 CACHE INTERNAL "Default SP_HEAP_MEM_SUPP value" FORCE) |
| 326 | message(STATUS "[PSA] : Defaulting SP_HEAP_MEM_SUPP to ${SP_HEAP_MEM_SUPP}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 327 | endif() |
| 328 | |
Vinay Kumar Kotegowder | ac21899 | 2020-04-03 12:56:00 +0530 | [diff] [blame] | 329 | if(NOT DEFINED SUITE_TEST_RANGE) |
| 330 | set(SUITE_TEST_RANGE_MIN None) |
| 331 | set(SUITE_TEST_RANGE_MAX None) |
| 332 | else() |
| 333 | list(LENGTH SUITE_TEST_RANGE SUITE_TEST_RANGE_LENGTH) |
| 334 | if(${SUITE_TEST_RANGE_LENGTH} GREATER "2") |
| 335 | message(FATAL_ERROR "[PSA] : -DSUITE_TEST_RANGE=<...> value error! accepts two " |
| 336 | " numbers in quotes separated with ';'") |
| 337 | endif() |
| 338 | if(${SUITE_TEST_RANGE_LENGTH} EQUAL "2") |
| 339 | list(GET SUITE_TEST_RANGE 0 SUITE_TEST_RANGE_MIN) |
| 340 | list(GET SUITE_TEST_RANGE 1 SUITE_TEST_RANGE_MAX) |
| 341 | message(STATUS "[PSA] : Testing (${SUITE_TEST_RANGE_MIN}, ${SUITE_TEST_RANGE_MAX}) of ${SUITE} suite") |
| 342 | endif() |
| 343 | if(${SUITE_TEST_RANGE_LENGTH} EQUAL "1") |
| 344 | set(SUITE_TEST_RANGE_MIN ${SUITE_TEST_RANGE}) |
| 345 | set(SUITE_TEST_RANGE_MAX ${SUITE_TEST_RANGE}) |
| 346 | message(STATUS "[PSA] : Testing ${SUITE_TEST_RANGE_MIN} of ${SUITE} suite") |
| 347 | endif() |
| 348 | endif() |
| 349 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 350 | message(STATUS "[PSA] : ----------Process input arguments- complete-------------") |
| 351 | |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 352 | |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 353 | if((${SUITE} STREQUAL "INITIAL_ATTESTATION") AND (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${PSA_TARGET_QCBOR})) |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 354 | # Clone QCBOR and move to specified tag |
| 355 | execute_process(COMMAND ${GIT_EXECUTABLE} clone ${PSA_QCBOR_GIT_REPO_LINK} ${PSA_TARGET_QCBOR} |
| 356 | RESULT_VARIABLE ${PSA_TARGET_QCBOR}_clone_result |
| 357 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) |
| 358 | if(${PSA_TARGET_QCBOR}_clone_result) |
| 359 | message(FATAL_ERROR "git clone failed for ${PSA_QCBOR_GIT_REPO_LINK}") |
| 360 | endif() |
| 361 | |
| 362 | if(NOT ${PSA_TARGET_QCBOR}_clone_result) |
| 363 | execute_process(COMMAND ${GIT_EXECUTABLE} checkout -q "${PSA_QCBOR_GIT_REPO_TAG}" |
| 364 | RESULT_VARIABLE ${PSA_TARGET_QCBOR}_checkout_result |
| 365 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PSA_TARGET_QCBOR}) |
| 366 | if(${PSA_TARGET_QCBOR}_checkout_result) |
| 367 | message(FATAL_ERROR "git checkout failed for Repo : ${PSA_QCBOR_GIT_REPO_LINK}, Tag : ${PSA_QCBOR_GIT_REPO_TAG}") |
| 368 | endif() |
| 369 | endif() |
| 370 | endif() |
gowtham siddarth | 1283304 | 2020-02-10 22:11:11 +0530 | [diff] [blame] | 371 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 372 | # Create PSA clean list |
| 373 | list(APPEND PSA_CLEAN_LIST |
| 374 | ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_HEADER} |
| 375 | ${PSA_TESTLIST_FILE} |
| 376 | ${PSA_TEST_ENTRY_LIST_INC} |
| 377 | ${PSA_TEST_ENTRY_FUN_DECLARE_INC} |
| 378 | ${PSA_CLIENT_TEST_LIST_DELCARE_INC} |
| 379 | ${PSA_CLIENT_TEST_LIST_INC} |
| 380 | ${PSA_SERVER_TEST_LIST_DECLARE_INC} |
| 381 | ${PSA_SERVER_TEST_LIST} |
| 382 | ) |
| 383 | |
| 384 | # Process testsuite.db |
| 385 | message(STATUS "[PSA] : Creating testlist.txt 'available at ${PSA_TESTLIST_FILE}'") |
| 386 | execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PSA_TESTLIST_GENERATOR} |
| 387 | ${SUITE_LOWER} |
| 388 | ${TESTSUITE_DB} |
| 389 | ${INCLUDE_PANIC_TESTS} |
| 390 | ${PSA_TESTLIST_FILE} |
| 391 | ${PSA_TEST_ENTRY_LIST_INC} |
| 392 | ${PSA_TEST_ENTRY_FUN_DECLARE_INC} |
| 393 | ${PSA_CLIENT_TEST_LIST_DELCARE_INC} |
| 394 | ${PSA_CLIENT_TEST_LIST_INC} |
| 395 | ${PSA_SERVER_TEST_LIST_DECLARE_INC} |
Vinay Kumar Kotegowder | ac21899 | 2020-04-03 12:56:00 +0530 | [diff] [blame] | 396 | ${PSA_SERVER_TEST_LIST} |
| 397 | ${SUITE_TEST_RANGE_MIN} |
| 398 | ${SUITE_TEST_RANGE_MAX}) |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 399 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 400 | # Creating CMake list variable from file |
| 401 | file(READ ${PSA_TESTLIST_FILE} PSA_TEST_LIST) |
Vinay Kumar Kotegowder | ac21899 | 2020-04-03 12:56:00 +0530 | [diff] [blame] | 402 | if(NOT PSA_TEST_LIST) |
| 403 | message(FATAL_ERROR "[PSA] : Invalid test number!") |
| 404 | endif() |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 405 | string(REGEX REPLACE "\n" ";" PSA_TEST_LIST "${PSA_TEST_LIST}") |
| 406 | |
| 407 | add_custom_target( |
| 408 | ${PSA_TARGET_GENERATE_DATABASE_PRE} |
| 409 | COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/platform |
| 410 | COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/val |
| 411 | COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/partition |
| 412 | COMMAND ${CMAKE_COMMAND} -E make_directory ${PSA_SUITE_OUT_DIR} |
| 413 | ) |
| 414 | |
| 415 | # Generate target files from User provided data base |
| 416 | include(ExternalProject) |
| 417 | ExternalProject_Add( |
| 418 | ${PSA_TARGET_GENERATE_DATABASE} |
| 419 | PREFIX ${CMAKE_CURRENT_BINARY_DIR} |
| 420 | DOWNLOAD_COMMAND "" |
| 421 | UPDATE_COMMAND "" |
| 422 | PATCH_COMMAND "" |
| 423 | BUILD_COMMAND "" |
| 424 | SOURCE_DIR "${PSA_ROOT_DIR}/tools/scripts/target_cfg" |
| 425 | CMAKE_ARGS -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} |
| 426 | -DOUT_DIR=${CMAKE_CURRENT_BINARY_DIR} |
| 427 | -DTARGET=${TARGET} |
| 428 | -DGENERATOR_FILE=${PSA_TARGET_CONFIG_HEADER_GENERATOR} |
| 429 | -DINCLUDE_DIR=${PSA_ROOT_DIR}/val/common |
| 430 | -DTARGET_CONFIGURATION_FILE=${TARGET_CONFIGURATION_FILE} |
| 431 | -DTGT_CONFIG_SOURCE_C=${TGT_CONFIG_SOURCE_C} |
| 432 | -DOUTPUT_HEADER=${OUTPUT_HEADER} |
| 433 | -DDATABASE_TABLE_NAME=${DATABASE_TABLE_NAME} |
| 434 | -DDATABASE_TABLE_SECTION_NAME=${DATABASE_TABLE_SECTION_NAME} |
| 435 | -DTARGET_HEADER_GEN_INCLUDE_PATHS=${TARGET_HEADER_GEN_INCLUDE_PATHS} |
| 436 | LIST_SEPARATOR | |
| 437 | TEST_COMMAND "" |
| 438 | ) |
| 439 | |
| 440 | # Add custom target to clean generated files of the external project |
| 441 | add_custom_target( |
| 442 | ${PSA_TARGET_GENERATE_DATABASE_POST} |
| 443 | COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/src/${PSA_TARGET_GENERATE_DATABASE}-build/ -- clean |
| 444 | ) |
| 445 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 446 | # Check for supported toolchain/s |
| 447 | if(${TOOLCHAIN} IN_LIST PSA_TOOLCHAIN_SUPPORT) |
jk-arm | 928e85a | 2021-05-13 12:07:04 +0530 | [diff] [blame] | 448 | if (DEFINED CROSS_COMPILE) |
Purvi Mehta | 6936e25 | 2021-05-21 21:06:13 +0800 | [diff] [blame] | 449 | if(${CROSS_COMPILE} AND NOT (${TOOLCHAIN} IN_LIST CROSS_COMPILE_TOOLCHAIN_SUPPORT)) |
Øyvind Rønningstad | c50804e | 2021-03-12 12:43:25 +0100 | [diff] [blame] | 450 | message(FATAL_ERROR "[PSA] : Error: CROSS_COMPILE not supported for this toolchain, supported toolchain are : ${CROSS_COMPILE_TOOLCHAIN_SUPPORT}") |
Purvi Mehta | 6936e25 | 2021-05-21 21:06:13 +0800 | [diff] [blame] | 451 | endif() |
jk-arm | 928e85a | 2021-05-13 12:07:04 +0530 | [diff] [blame] | 452 | endif() |
| 453 | include(${PSA_ROOT_DIR}/tools/cmake/compiler/${TOOLCHAIN}.cmake) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 454 | else() |
Øyvind Rønningstad | abbb727 | 2020-11-09 14:50:54 +0100 | [diff] [blame] | 455 | message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DTOOLCHAIN=${TOOLCHAIN}, supported toolchain are : ${PSA_TOOLCHAIN_SUPPORT}") |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 456 | endif() |
| 457 | |
| 458 | # Global macro to identify the PSA test suite cmake build |
| 459 | add_definitions(-DPSA_CMAKE_BUILD) |
| 460 | add_definitions(-D${SUITE}) |
| 461 | add_definitions(-DVERBOSE=${VERBOSE}) |
Jaykumar Pitambarbhai Patel | ccf5bf2 | 2019-12-06 11:58:32 +0530 | [diff] [blame] | 462 | add_definitions(-DPLATFORM_PSA_ISOLATION_LEVEL=${PLATFORM_PSA_ISOLATION_LEVEL}) |
Vinay Kumar Kotegowder | 52bbfc9 | 2020-07-03 17:23:59 +0530 | [diff] [blame] | 463 | add_definitions(-D${TARGET}) |
jotman01 | 6d7dd4e | 2020-11-10 17:32:28 +0800 | [diff] [blame] | 464 | if("${TFM_PROFILE}" STREQUAL "profile_small") |
| 465 | message(STATUS "[PSA] : Building SMALL profile") |
| 466 | add_definitions(-DTF_M_PROFILE_SMALL) |
| 467 | elseif("${TFM_PROFILE}" STREQUAL "profile_medium") |
| 468 | message(STATUS "[PSA] : Building MEDIUM profile") |
| 469 | add_definitions(-DTF_M_PROFILE_MEDIUM) |
| 470 | endif() |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 471 | if(${SP_HEAP_MEM_SUPP} EQUAL 1) |
| 472 | add_definitions(-DSP_HEAP_MEM_SUPP) |
| 473 | endif() |
| 474 | |
Jaykumar Pitambarbhai Patel | 6c3b808 | 2020-02-26 19:51:37 +0530 | [diff] [blame] | 475 | # Build PAL NSPE LIB |
| 476 | include(${PSA_ROOT_DIR}/platform/targets/${TARGET}/target.cmake) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 477 | # Build VAL NSPE LIB |
| 478 | #add_definitions(-DVAL_NSPE_BUILD) |
| 479 | include(${PSA_ROOT_DIR}/val/val_nspe.cmake) |
| 480 | # Build test |
| 481 | include(${PSA_SUITE_DIR}/suite.cmake) |
| 482 | if(${SUITE} STREQUAL "IPC") |
| 483 | # Build SPE LIB |
| 484 | include(${PSA_ROOT_DIR}/val/val_spe.cmake) |
| 485 | endif() |
| 486 | |
| 487 | add_dependencies(${PSA_TARGET_GENERATE_DATABASE} ${PSA_TARGET_GENERATE_DATABASE_PRE}) |
| 488 | add_dependencies(${PSA_TARGET_GENERATE_DATABASE_POST} ${PSA_TARGET_GENERATE_DATABASE}) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 489 | add_dependencies(${PSA_TARGET_PAL_NSPE_LIB} ${PSA_TARGET_GENERATE_DATABASE_POST}) |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 490 | add_dependencies(${PSA_TARGET_VAL_NSPE_LIB} ${PSA_TARGET_PAL_NSPE_LIB}) |
| 491 | add_dependencies(${PSA_TARGET_TEST_COMBINE_LIB} ${PSA_TARGET_VAL_NSPE_LIB}) |
| 492 | if(${SUITE} STREQUAL "IPC") |
| 493 | add_dependencies(${PSA_TARGET_DRIVER_PARTITION_LIB} ${PSA_TARGET_TEST_COMBINE_LIB}) |
| 494 | add_dependencies(${PSA_TARGET_CLIENT_PARTITION_LIB} ${PSA_TARGET_DRIVER_PARTITION_LIB}) |
| 495 | add_dependencies(${PSA_TARGET_SERVER_PARTITION_LIB} ${PSA_TARGET_CLIENT_PARTITION_LIB}) |
| 496 | endif() |
| 497 | |
| 498 | # Include the files for make clean |
| 499 | foreach(clean_item ${PSA_CLEAN_LIST}) |
| 500 | set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clean_item}) |
| 501 | endforeach() |
| 502 | |
| 503 | set_property(TARGET ${PSA_TARGET_VAL_NSPE_LIB} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/val) |
| 504 | set_property(TARGET ${PSA_TARGET_PAL_NSPE_LIB} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/platform) |
| 505 | set_property(TARGET ${PSA_TARGET_TEST_COMBINE_LIB} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${PSA_SUITE_OUT_DIR}) |
| 506 | if(${SUITE} STREQUAL "IPC") |
| 507 | set_property(TARGET ${PSA_TARGET_DRIVER_PARTITION_LIB} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/partition) |
| 508 | set_property(TARGET ${PSA_TARGET_CLIENT_PARTITION_LIB} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/partition) |
| 509 | set_property(TARGET ${PSA_TARGET_SERVER_PARTITION_LIB} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/partition) |
| 510 | endif() |