aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt27
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 37b7d8b..4b18862 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -20,18 +20,23 @@ set(CORE_PLATFORM_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../core_platform)
file(GLOB models LIST_DIRECTORIES true "${CORE_PLATFORM_PATH}/applications/baremetal/models/${ETHOSU_TARGET_NPU_CONFIG}/*")
-# Build executable
-foreach(model ${models})
- get_filename_component(modelname ${model} NAME)
+function(add_test_executable testname)
+ # Build executable
+ foreach(model ${models})
+ get_filename_component(modelname ${model} NAME)
- add_executable(lds_${modelname}_tests "main.cpp")
+ add_executable(lds_${testname}_${modelname} ${testname}.cpp)
- target_include_directories(lds_${modelname}_tests PRIVATE
- ${model})
+ target_include_directories(lds_${testname}_${modelname} PRIVATE
+ ${model})
- # Link agains ethosu library
- target_link_libraries(lds_${modelname}_tests PRIVATE ethosu)
+ # Link agains ethosu library
+ target_link_libraries(lds_${testname}_${modelname} PRIVATE ethosu)
- # Install target
- install(TARGETS lds_${modelname}_tests DESTINATION "bin")
-endforeach()
+ # Install target
+ install(TARGETS lds_${testname}_${modelname} DESTINATION "bin")
+ endforeach()
+endfunction()
+
+add_test_executable(run_inference_test)
+add_test_executable(cancel_inference_test)