From 15625f17e4c5f71be970cda8bf918cc00e613cad Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Wed, 24 Nov 2021 14:16:34 +0100 Subject: Exclude applications that depend on NPU Exclude applications that depend on the NPU, if the NPU driver library was not compiled by the project. Change-Id: I3fcb570cf155d589a9576266332ba519a11186f1 --- applications/baremetal/CMakeLists.txt | 8 +++++--- applications/baremetal/main.cpp | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'applications/baremetal') diff --git a/applications/baremetal/CMakeLists.txt b/applications/baremetal/CMakeLists.txt index c0ecf03..37073bb 100644 --- a/applications/baremetal/CMakeLists.txt +++ b/applications/baremetal/CMakeLists.txt @@ -21,16 +21,18 @@ set(BAREMETAL_PATH "" CACHE PATH "Path to input, output and network for baremeta if (IS_DIRECTORY ${BAREMETAL_PATH}) ethosu_add_executable_test(baremetal_custom PRIVATE SOURCES main.cpp - LIBRARIES ethosu_monitor) + LIBRARIES $<$:ethosu_monitor>) target_include_directories(baremetal_custom PRIVATE ${BAREMETAL_PATH}) endif() -file(GLOB models LIST_DIRECTORIES true "${CMAKE_CURRENT_SOURCE_DIR}/models/${ETHOSU_TARGET_NPU_CONFIG}/*") +if (TARGET ethosu_core_driver) + file(GLOB models LIST_DIRECTORIES true "${CMAKE_CURRENT_SOURCE_DIR}/models/${ETHOSU_TARGET_NPU_CONFIG}/*") +endif() foreach(model ${models}) get_filename_component(name ${model} NAME) ethosu_add_executable_test(baremetal_${name} PRIVATE SOURCES main.cpp - LIBRARIES ethosu_monitor) + LIBRARIES $<$:ethosu_monitor>) target_include_directories(baremetal_${name} PRIVATE ${model}) endforeach() \ No newline at end of file diff --git a/applications/baremetal/main.cpp b/applications/baremetal/main.cpp index e394e3a..ea5f03c 100644 --- a/applications/baremetal/main.cpp +++ b/applications/baremetal/main.cpp @@ -20,10 +20,9 @@ * Includes ****************************************************************************/ -// NPU driver -#include "ethosu_driver.h" // Inference process #include "inference_process.hpp" + // System includes #include #include @@ -34,6 +33,7 @@ #include "output.h" #ifdef ETHOSU +#include #include #include #endif -- cgit v1.2.1