Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 1 | # |
Ryan OShea | b554054 | 2022-07-06 09:52:52 +0100 | [diff] [blame] | 2 | # Copyright © 2017, 2023 Arm Ltd. All rights reserved. |
Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
Jim Flynn | 870b96c | 2022-03-25 21:24:56 +0000 | [diff] [blame] | 6 | |
Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 7 | # File needed to wrap the existing backend into a dynamic one |
| 8 | list(APPEND armnnRefDynamicBackend_sources |
| 9 | RefDynamicBackend.cpp |
| 10 | RefDynamicBackend.hpp |
| 11 | ) |
| 12 | |
| 13 | # Set the backend source path |
| 14 | set(RefBackendPath ${PROJECT_SOURCE_DIR}/src/backends/reference) |
| 15 | |
| 16 | # Source files of the backend, taken directly from the source tree |
| 17 | file(GLOB RefBackendBaseFiles ${RefBackendPath}/*.cpp) |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 18 | file(GLOB RefBackendWorloadFiles ${RefBackendPath}/workloads/*.cpp) |
| 19 | set(RefBackendFiles ${RefBackendBaseFiles} ${RefBackendWorloadFiles}) |
Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 20 | |
| 21 | # Remove the file that contains the static backend registration |
| 22 | list(REMOVE_ITEM RefBackendFiles ${RefBackendPath}/RefRegistryInitializer.cpp) |
| 23 | |
| 24 | # Create the shared object |
| 25 | add_library(Arm_CpuRef_backend MODULE ${armnnRefDynamicBackend_sources} ${RefBackendFiles}) |
| 26 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 27 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils) |
| 28 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
Narumol Prangnawarat | 85ad78c | 2019-11-18 15:34:23 +0000 | [diff] [blame] | 29 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/profiling) |
Finn Williams | 56b465d | 2020-05-15 13:34:12 +0100 | [diff] [blame] | 30 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/profiling/common/include) |
Jim Flynn | 2776183 | 2022-03-20 21:52:17 +0000 | [diff] [blame] | 31 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/profiling/client/include) |
Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 32 | set_target_properties(Arm_CpuRef_backend PROPERTIES PREFIX "") |
| 33 | target_link_libraries(Arm_CpuRef_backend armnn) |