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 | |
Jim Flynn | 870b96c | 2022-03-25 21:24:56 +0000 | [diff] [blame] | 6 | if(NOT BUILD_BARE_METAL) |
| 7 | |
Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 8 | # File needed to wrap the existing backend into a dynamic one |
| 9 | list(APPEND armnnRefDynamicBackend_sources |
| 10 | RefDynamicBackend.cpp |
| 11 | RefDynamicBackend.hpp |
| 12 | ) |
| 13 | |
| 14 | # Set the backend source path |
| 15 | set(RefBackendPath ${PROJECT_SOURCE_DIR}/src/backends/reference) |
| 16 | |
| 17 | # Source files of the backend, taken directly from the source tree |
| 18 | file(GLOB RefBackendBaseFiles ${RefBackendPath}/*.cpp) |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 19 | file(GLOB RefBackendWorloadFiles ${RefBackendPath}/workloads/*.cpp) |
| 20 | set(RefBackendFiles ${RefBackendBaseFiles} ${RefBackendWorloadFiles}) |
Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 21 | |
| 22 | # Remove the file that contains the static backend registration |
| 23 | list(REMOVE_ITEM RefBackendFiles ${RefBackendPath}/RefRegistryInitializer.cpp) |
| 24 | |
| 25 | # Create the shared object |
| 26 | add_library(Arm_CpuRef_backend MODULE ${armnnRefDynamicBackend_sources} ${RefBackendFiles}) |
| 27 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 28 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils) |
| 29 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
Narumol Prangnawarat | 85ad78c | 2019-11-18 15:34:23 +0000 | [diff] [blame] | 30 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/profiling) |
Finn Williams | 56b465d | 2020-05-15 13:34:12 +0100 | [diff] [blame] | 31 | 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] | 32 | 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] | 33 | set_target_properties(Arm_CpuRef_backend PROPERTIES PREFIX "") |
| 34 | target_link_libraries(Arm_CpuRef_backend armnn) |
Jim Flynn | 870b96c | 2022-03-25 21:24:56 +0000 | [diff] [blame] | 35 | |
| 36 | # BUILD_BARE_METAL |
| 37 | endif() |