diff options
Diffstat (limited to 'tests/custom_op/apps/CMakeLists.txt')
-rw-r--r-- | tests/custom_op/apps/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/custom_op/apps/CMakeLists.txt b/tests/custom_op/apps/CMakeLists.txt new file mode 100644 index 000000000..18eef3f0e --- /dev/null +++ b/tests/custom_op/apps/CMakeLists.txt @@ -0,0 +1,20 @@ +if(NOT BUILD_NEURUN) + return() +endif(NOT BUILD_NEURUN) + +# Takes target name, source list and kernel list +function(add_nnfw_custom_op_app NAME) + cmake_parse_arguments( + PARSED_ARGS # prefix of output variables + "" # list of names of the boolean arguments (only defined ones will be true) + "" # list of names of mono-valued arguments + "SOURCES;KERNELS" # list of names of multi-valued arguments (output variables are lists) + ${ARGN} # arguments of the function to parse, here we take the all original ones + ) + add_executable(${NAME} ${PARSED_ARGS_SOURCES}) + target_link_libraries(${NAME} PRIVATE ${PARSED_ARGS_KERNELS}) + target_link_libraries(${NAME} PRIVATE nnfw-dev) + target_link_libraries(${NAME} PRIVATE dl ${LIB_PTHREAD}) +endfunction() + +add_subdirectories() |