MLECO-3254 Default to using only one file per UC
Signed-off-by: Eanna O Cathain <eanna.ocathain@arm.com>
Change-Id: I4a1cd2b5746cb479ae0d81ed973961cec2f3046e
diff --git a/scripts/cmake/util_functions.cmake b/scripts/cmake/util_functions.cmake
index 25f9731..9aa19b9 100644
--- a/scripts/cmake/util_functions.cmake
+++ b/scripts/cmake/util_functions.cmake
@@ -212,3 +212,17 @@
endif ()
endfunction()
+
+function(set_input_file_path_user_option file_extension use_case)
+ if(NOT USE_SINGLE_INPUT)
+ USER_OPTION(${use_case}_FILE_PATH "Directory with custom input files, or path to a single input file, to use in the evaluation application."
+ ${CMAKE_CURRENT_SOURCE_DIR}/resources/${use_case}/samples/
+ PATH_OR_FILE)
+ else()
+ file(GLOB_RECURSE INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/resources/${use_case}/samples/*${file_extension})
+ list (GET INPUTS 0 FIRST_INPUT_FILE)
+ USER_OPTION(${use_case}_FILE_PATH "Directory with custom input files, or path to a single input file, to use in the evaluation application."
+ ${FIRST_INPUT_FILE}
+ PATH_OR_FILE)
+ endif()
+endfunction()
\ No newline at end of file