From 31fe6f8c6871de2a1907b83b07960525e7be03ee Mon Sep 17 00:00:00 2001 From: Manupa Karunaratne Date: Wed, 1 Dec 2021 19:13:23 +0000 Subject: [PATCH] [microNPU] fix the CMake to keep utils.cc If the build does not use USE_ETHOSU ON, it will report that Object definitions are missing. This change will keep the file that has the Object definitions. Change-Id: I64776f941bf0475e10397ff2cdbfd73a909611a0 --- cmake/modules/contrib/EthosU.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/modules/contrib/EthosU.cmake b/cmake/modules/contrib/EthosU.cmake index f66e4af55626..f4379753f9e2 100644 --- a/cmake/modules/contrib/EthosU.cmake +++ b/cmake/modules/contrib/EthosU.cmake @@ -20,4 +20,10 @@ if(USE_ETHOSU) CONFIGURE_DEPENDS src/relay/backend/contrib/ethosu/* CONFIGURE_DEPENDS src/contrib/ethosu/cascader/*) list(APPEND COMPILER_SRCS ${COMPILER_ETHOSU_SRCS}) +else() + # Keeping just utils.cc because it has Object definitions + # used by python side + file(GLOB COMPILER_ETHOSU_SRCS + CONFIGURE_DEPENDS src/relay/backend/contrib/ethosu/utils.cc) + list(APPEND COMPILER_SRCS ${COMPILER_ETHOSU_SRCS}) endif(USE_ETHOSU) \ No newline at end of file