diff options
author | 박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com> | 2018-05-25 17:54:55 +0900 |
---|---|---|
committer | 서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com> | 2018-05-25 17:54:55 +0900 |
commit | b37a49178596ec5531de6bdfb54dca40f9e2be21 (patch) | |
tree | 053ed4dc68ef610a74e62863b49b508110e9ca73 /contrib | |
parent | f446d6343f4f68171b8d86e7cdddc0f7c291da35 (diff) | |
download | nnfw-b37a49178596ec5531de6bdfb54dca40f9e2be21.tar.gz nnfw-b37a49178596ec5531de6bdfb54dca40f9e2be21.tar.bz2 nnfw-b37a49178596ec5531de6bdfb54dca40f9e2be21.zip |
Allow build contrib projects when BUILD_LABS is on (#1352)
This commit revises contrib/CMakeLists.txt to allow users to build
contrib porjects other than bindacl, convacl, and kerneltesting even
when BUILD_LABS is on.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/CMakeLists.txt | 20 | ||||
-rw-r--r-- | contrib/bindacl/CMakeLists.txt | 8 | ||||
-rw-r--r-- | contrib/convacl/CMakeLists.txt | 8 | ||||
-rw-r--r-- | contrib/kerneltesting/CMakeLists.txt | 8 |
4 files changed, 28 insertions, 16 deletions
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 69c4fee48..78417eacb 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -1,18 +1,6 @@ file(GLOB CONTRIB_CMAKE_FILES "*/CMakeLists.txt") -if(BUILD_LABS) - # TODO: These came from labs. Decide when to build these without using BUILD_LABS - if(${TARGET_ARCH_BASE} STREQUAL "arm") - add_subdirectory(bindacl) - add_subdirectory(convacl) - add_subdirectory(kerneltesting) - endif() - -elseif(BUILD_LABS) - - foreach(CONTRIB_CMAKE_FILE ${CONTRIB_CMAKE_FILES}) - get_filename_component(CONTRIB_BASE ${CONTRIB_CMAKE_FILE} DIRECTORY) - add_subdirectory(${CONTRIB_BASE}) - endforeach(CONTRIB_CMAKE_FILE ${CONTRIB_CMAKE_FILES}) - -endif(BUILD_LABS) +foreach(CONTRIB_CMAKE_FILE ${CONTRIB_CMAKE_FILES}) + get_filename_component(CONTRIB_BASE ${CONTRIB_CMAKE_FILE} DIRECTORY) + add_subdirectory(${CONTRIB_BASE}) +endforeach(CONTRIB_CMAKE_FILE ${CONTRIB_CMAKE_FILES}) diff --git a/contrib/bindacl/CMakeLists.txt b/contrib/bindacl/CMakeLists.txt index 200cc176a..7fc6375a4 100644 --- a/contrib/bindacl/CMakeLists.txt +++ b/contrib/bindacl/CMakeLists.txt @@ -1,3 +1,11 @@ +if(NOT BUILD_LABS) + return() +endif(NOT BUILD_LABS) + +if(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") + return() +endif(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") + file(GLOB_RECURSE NNAPI_BINDACL_SRCS "src/*.cc") link_directories(${CMAKE_INSTALL_PREFIX}/lib) diff --git a/contrib/convacl/CMakeLists.txt b/contrib/convacl/CMakeLists.txt index ff2920579..62ce3e01a 100644 --- a/contrib/convacl/CMakeLists.txt +++ b/contrib/convacl/CMakeLists.txt @@ -1,3 +1,11 @@ +if(NOT BUILD_LABS) + return() +endif(NOT BUILD_LABS) + +if(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") + return() +endif(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") + file(GLOB_RECURSE NNAPI_CONVACL_SRCS "src/*.cc") link_directories(${CMAKE_INSTALL_PREFIX}/lib) diff --git a/contrib/kerneltesting/CMakeLists.txt b/contrib/kerneltesting/CMakeLists.txt index fce17bd89..d927409f8 100644 --- a/contrib/kerneltesting/CMakeLists.txt +++ b/contrib/kerneltesting/CMakeLists.txt @@ -1,3 +1,11 @@ +if(NOT BUILD_LABS) + return() +endif(NOT BUILD_LABS) + +if(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") + return() +endif(NOT ${TARGET_ARCH_BASE} STREQUAL "arm") + function(add_kerneltesting TESTNAME SRC_FILES) link_directories(${CMAKE_INSTALL_PREFIX}/lib) add_executable(${TESTNAME} ${SRC_FILES}) |