aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/CMakeLists.txt
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-08-14 14:05:46 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-08-22 17:30:13 +0100
commite67edb238a3304dd767a34eca484d84bfebf76f5 (patch)
treefb0b7f1c13c7234c77e85953b4a9f6d4a0602617 /src/backends/reference/CMakeLists.txt
parentc33882d1369927ad02f665b273af129c89834229 (diff)
downloadarmnn-e67edb238a3304dd767a34eca484d84bfebf76f5.tar.gz
IVGCVSW-3656 Make the reference backend optional
* Made the build of the reference backend depend on a new ARMCOMPUTEREF macro * Made the relevant targets dependent on the ref backend * Moved Cl and Neon static registry initializers to separate files * Wrapped some of the unit tests into proper ifdefs where necessary Change-Id: I7f2c42699682630233a4c4b6aed2f005083de189 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/backends/reference/CMakeLists.txt')
-rw-r--r--src/backends/reference/CMakeLists.txt53
1 files changed, 31 insertions, 22 deletions
diff --git a/src/backends/reference/CMakeLists.txt b/src/backends/reference/CMakeLists.txt
index 6852ab0b74..ff253787a1 100644
--- a/src/backends/reference/CMakeLists.txt
+++ b/src/backends/reference/CMakeLists.txt
@@ -3,30 +3,39 @@
# SPDX-License-Identifier: MIT
#
-list(APPEND armnnRefBackend_sources
- RefBackend.cpp
- RefBackend.hpp
- RefBackendId.hpp
- RefTensorHandle.hpp
- RefTensorHandle.cpp
- RefLayerSupport.cpp
- RefLayerSupport.hpp
- RefMemoryManager.hpp
- RefMemoryManager.cpp
- RefRegistryInitializer.cpp
- RefWorkloadFactory.cpp
- RefWorkloadFactory.hpp
- RefTensorHandleFactory.hpp
- RefTensorHandleFactory.cpp
-)
+if(ARMCOMPUTEREF)
+ list(APPEND armnnRefBackend_sources
+ RefBackend.cpp
+ RefBackend.hpp
+ RefBackendId.hpp
+ RefTensorHandle.hpp
+ RefTensorHandle.cpp
+ RefLayerSupport.cpp
+ RefLayerSupport.hpp
+ RefMemoryManager.hpp
+ RefMemoryManager.cpp
+ RefRegistryInitializer.cpp
+ RefWorkloadFactory.cpp
+ RefWorkloadFactory.hpp
+ RefTensorHandleFactory.cpp
+ RefTensorHandleFactory.hpp
+ )
+
+ add_subdirectory(workloads)
+
+ if(BUILD_UNIT_TESTS)
+ add_subdirectory(test)
+ endif()
+
+else()
+ list(APPEND armnnRefBackend_sources
+ RefBackendId.hpp
+ RefLayerSupport.cpp
+ RefLayerSupport.hpp
+ )
+endif()
add_library(armnnRefBackend OBJECT ${armnnRefBackend_sources})
target_include_directories(armnnRefBackend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn)
target_include_directories(armnnRefBackend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils)
target_include_directories(armnnRefBackend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends)
-
-add_subdirectory(workloads)
-
-if(BUILD_UNIT_TESTS)
- add_subdirectory(test)
-endif()