This commit introduces add_nnapi_unittest function in 'CMakeLists.txt'
to make it easy to add new unittests.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
target_include_directories(nnapi_unitest_common PUBLIC "inc")
target_link_libraries(nnapi_unitest_common tensorflow_lite)
-add_executable(nnapi_unittest_conv_1 "tests/conv_1.cpp")
-target_link_libraries(nnapi_unittest_conv_1 nnapi_unitest_common)
+function(add_nnapi_unittest NAME)
+ add_executable(nnapi_unittest_${NAME} "tests/${NAME}.cpp")
+ target_link_libraries(nnapi_unittest_${NAME} nnapi_unitest_common)
+endfunction(add_nnapi_unittest)
+
+add_nnapi_unittest(conv_1)