summaryrefslogtreecommitdiff
path: root/runtimes/libs/ARMComputeEx/CMakeLists.txt
blob: ba1536dfeb14b7a8e3dadc5ec08042e1439a45fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
nnfw_find_package(ARMCompute QUIET)

if(NOT ARMCompute_FOUND)
  message(STATUS "Check ARM Compute library extension build: need ARM Compute library")
  return()
else(NOT ARMCompute_FOUND)
  message(STATUS "Check ARM Compute library extension build: OK")
endif(NOT ARMCompute_FOUND)

set(ACL_EX_BASE ${CMAKE_CURRENT_SOURCE_DIR})

file(GLOB_RECURSE ACL_EX_SRCS "${ACL_EX_BASE}/*.cpp")

# generate embeded cl_kernel
execute_process (
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
    COMMAND bash -c "python resolve_includes.py"
)

add_library(arm_compute_ex SHARED ${ACL_EX_SRCS})
target_include_directories(arm_compute_ex PUBLIC ${ACL_EX_BASE})
target_link_libraries(arm_compute_ex PRIVATE arm_compute_core)
target_link_libraries(arm_compute_ex PRIVATE nnfw_common)
target_link_libraries(arm_compute_ex PRIVATE nnfw_coverage)
# Defines to enable validate check in debug build
target_compile_definitions(arm_compute_ex PRIVATE EMBEDDED_KERNELS
                                                  $<$<CONFIG:Debug>:ARM_COMPUTE_DEBUG_ENABLED ARM_COMPUTE_ASSERTS_ENABLED
                                                                    ARM_COMPUTE_LOGGING_ENABLED>)
# Validate check functions are not used on release build
# Some parameter are used for validate check function call, and these parameter may not used on release build
target_compile_options(arm_compute_ex PRIVATE $<$<NOT:$<CONFIG:Debug>>:-Wno-unused-parameter -Wno-unused-function>)
install(TARGETS arm_compute_ex DESTINATION lib)