IVGCVSW-2022 : fix for backend cmake files to respect BUILD_UNIT_TESTS variable
[platform/upstream/armnn.git] / src / backends / cl / CMakeLists.txt
1 #
2 # Copyright © 2017 Arm Ltd. All rights reserved.
3 # SPDX-License-Identifier: MIT
4 #
5
6 list(APPEND armnnClBackend_sources
7     ClBackend.cpp
8     ClBackend.hpp
9     ClContextControl.cpp
10     ClContextControl.hpp
11     ClLayerSupport.cpp
12     ClLayerSupport.hpp
13     ClWorkloadFactory.cpp
14     ClWorkloadFactory.hpp
15 )
16
17 if(ARMCOMPUTECL)
18     list(APPEND armnnClBackend_sources
19         OpenClTimer.cpp
20         OpenClTimer.hpp
21     )
22
23     add_subdirectory(workloads)
24
25     if(BUILD_UNIT_TESTS)
26         add_subdirectory(test)
27     endif()
28 endif()
29
30 add_library(armnnClBackend OBJECT ${armnnClBackend_sources})
31 target_include_directories(armnnClBackend PRIVATE ${PROJECT_SOURCE_DIR}/src)
32 target_include_directories(armnnClBackend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn)
33 target_include_directories(armnnClBackend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils)