Gyorgy Szing | 4909180 | 2020-11-24 00:33:09 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Andrew Beggs | 97a00d4 | 2021-06-15 15:45:46 +0000 | [diff] [blame] | 2 | # Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. |
Gyorgy Szing | 4909180 | 2020-11-24 00:33:09 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | if (NOT DEFINED TGT) |
| 9 | message(FATAL_ERROR "mandatory parameter TGT is not defined.") |
| 10 | endif() |
| 11 | |
| 12 | target_sources(${TGT} PRIVATE |
| 13 | "${CMAKE_CURRENT_LIST_DIR}/libsp_entry.c" |
Imre Kis | 2ccd8e8 | 2021-10-08 11:21:14 +0200 | [diff] [blame^] | 14 | "${CMAKE_CURRENT_LIST_DIR}/sp_trace.c" |
Gyorgy Szing | 4909180 | 2020-11-24 00:33:09 +0100 | [diff] [blame] | 15 | ) |
Andrew Beggs | 97a00d4 | 2021-06-15 15:45:46 +0000 | [diff] [blame] | 16 | |
| 17 | target_include_directories(${TGT} |
Imre Kis | 2ccd8e8 | 2021-10-08 11:21:14 +0200 | [diff] [blame^] | 18 | PUBLIC |
| 19 | "${CMAKE_CURRENT_LIST_DIR}/include" |
| 20 | ) |
| 21 | |
| 22 | if (NOT DEFINED TRACE_PREFIX) |
| 23 | set(TRACE_PREFIX "SP" CACHE STRING "Trace prefix") |
| 24 | endif() |
| 25 | |
| 26 | if (NOT DEFINED TRACE_LEVEL) |
| 27 | set(TRACE_LEVEL "TRACE_LEVEL_ERROR" CACHE STRING "Trace level") |
| 28 | endif() |
| 29 | |
| 30 | target_compile_definitions(${TGT} PRIVATE |
| 31 | TRACE_LEVEL=${TRACE_LEVEL} |
| 32 | TRACE_PREFIX="${TRACE_PREFIX}" |
| 33 | ) |