blob: acf53383a14a1c2eae42d5b6890e4d161b26c23e [file] [log] [blame]
Matteo Martincigh4e73b422019-08-08 13:46:32 +01001#
Ryan OSheab5540542022-07-06 09:52:52 +01002# Copyright © 2017, 2023 Arm Ltd. All rights reserved.
Matteo Martincigh4e73b422019-08-08 13:46:32 +01003# SPDX-License-Identifier: MIT
4#
5
Jim Flynn870b96c2022-03-25 21:24:56 +00006
Matteo Martincigh4e73b422019-08-08 13:46:32 +01007# File needed to wrap the existing backend into a dynamic one
8list(APPEND armnnRefDynamicBackend_sources
9 RefDynamicBackend.cpp
10 RefDynamicBackend.hpp
11)
12
13# Set the backend source path
14set(RefBackendPath ${PROJECT_SOURCE_DIR}/src/backends/reference)
15
16# Source files of the backend, taken directly from the source tree
17file(GLOB RefBackendBaseFiles ${RefBackendPath}/*.cpp)
Matteo Martincighe67edb22019-08-14 14:05:46 +010018file(GLOB RefBackendWorloadFiles ${RefBackendPath}/workloads/*.cpp)
19set(RefBackendFiles ${RefBackendBaseFiles} ${RefBackendWorloadFiles})
Matteo Martincigh4e73b422019-08-08 13:46:32 +010020
21# Remove the file that contains the static backend registration
22list(REMOVE_ITEM RefBackendFiles ${RefBackendPath}/RefRegistryInitializer.cpp)
23
24# Create the shared object
25add_library(Arm_CpuRef_backend MODULE ${armnnRefDynamicBackend_sources} ${RefBackendFiles})
26target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn)
27target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils)
28target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends)
Narumol Prangnawarat85ad78c2019-11-18 15:34:23 +000029target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/profiling)
Finn Williams56b465d2020-05-15 13:34:12 +010030target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/profiling/common/include)
Jim Flynn27761832022-03-20 21:52:17 +000031target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/profiling/client/include)
Matteo Martincigh4e73b422019-08-08 13:46:32 +010032set_target_properties(Arm_CpuRef_backend PROPERTIES PREFIX "")
33target_link_libraries(Arm_CpuRef_backend armnn)