diff options
author | 오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com> | 2019-09-05 11:13:11 +0900 |
---|---|---|
committer | GitHub Enterprise <noreply-CODE@samsung.com> | 2019-09-05 11:13:11 +0900 |
commit | f234906aa3c50df7bcafcfa4f25a652d9e874bcb (patch) | |
tree | 06bfcf5432e6e1a16caf0c3cc6ccef3c949a7116 /runtimes | |
parent | 1e80cdf26f8381e970fe52f6d4c8ddf7214848cd (diff) | |
download | nnfw-f234906aa3c50df7bcafcfa4f25a652d9e874bcb.tar.gz nnfw-f234906aa3c50df7bcafcfa4f25a652d9e874bcb.tar.bz2 nnfw-f234906aa3c50df7bcafcfa4f25a652d9e874bcb.zip |
Update srcn kernel library cmake (#7135)
Use finding arm_neon.h instead of checking target arch
Link libraries OpenMP_CXX_LIBRARIES
Prepare compile definition NCNN and comment out
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Diffstat (limited to 'runtimes')
-rw-r--r-- | runtimes/libs/srcn/CMakeLists.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/runtimes/libs/srcn/CMakeLists.txt b/runtimes/libs/srcn/CMakeLists.txt index f14dd5e22..c6ad82366 100644 --- a/runtimes/libs/srcn/CMakeLists.txt +++ b/runtimes/libs/srcn/CMakeLists.txt @@ -1,20 +1,26 @@ -if("${TARGET_ARCH}" STREQUAL "x86_64") - return() -endif() - # Find and use pre-installed OpenMP find_package(OpenMP QUIET) if(NOT OpenMP_FOUND) return() endif(NOT OpenMP_FOUND) +# Include arm_neon.h in src/common.h +find_path(TARGET_HEADER arm_neon.h) +if(NOT TARGET_HEADER) + message(STATUS "Check for SRCN kernel library build: need arm_neon header") + return() +else(NOT TARGET_HEADER) + message(STATUS "Check for SRCN kernel library build: OK") +endif(NOT TARGET_HEADER) + file(GLOB_RECURSE SOURCES "*.cc") file(GLOB_RECURSE TESTS "*_test.cc") list(REMOVE_ITEM SOURCES ${TESTS}) add_library(nnfw_lib_srcn STATIC ${SOURCES}) target_include_directories(nnfw_lib_srcn PUBLIC include) -target_link_libraries(nnfw_lib_srcn PRIVATE ${OpenMP_CXX_FLAGS}) +target_link_libraries(nnfw_lib_srcn PRIVATE ${OpenMP_CXX_LIBRARIES}) target_compile_options(nnfw_lib_srcn PRIVATE ${OpenMP_CXX_FLAGS}) -target_compile_options(nnfw_lib_srcn PRIVATE -DTIZEN) +target_compile_definitions(nnfw_lib_srcn PRIVATE TIZEN) # ANDROID or TIZEN +#target_compile_definitions(nnfw_lib_srcn PRIVATE NCNN) # Enable if ready set_target_properties(nnfw_lib_srcn PROPERTIES POSITION_INDEPENDENT_CODE ON) |