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