diff options
author | Eanna O Cathain <eanna.ocathain@arm.com> | 2022-09-22 15:18:34 +0100 |
---|---|---|
committer | Eanna O Cathain <eanna.ocathain@arm.com> | 2022-09-26 10:16:25 +0100 |
commit | 4c0ac91ef2b052eb57328b85edcb0071cb7558b2 (patch) | |
tree | be057efcc32bd329ccce8f446a7213d923ee6761 /scripts | |
parent | 27c5e3091ab3d5f6efd6407f0a44531e717ccd69 (diff) | |
download | ml-embedded-evaluation-kit-4c0ac91ef2b052eb57328b85edcb0071cb7558b2.tar.gz |
MLECO-3254 Default to using only one file per UC
Signed-off-by: Eanna O Cathain <eanna.ocathain@arm.com>
Change-Id: I4a1cd2b5746cb479ae0d81ed973961cec2f3046e
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/cmake/common_user_options.cmake | 4 | ||||
-rw-r--r-- | scripts/cmake/util_functions.cmake | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/scripts/cmake/common_user_options.cmake b/scripts/cmake/common_user_options.cmake index 36426a8..7a0b068 100644 --- a/scripts/cmake/common_user_options.cmake +++ b/scripts/cmake/common_user_options.cmake @@ -77,6 +77,10 @@ USER_OPTION(TENSORFLOW_LITE_MICRO_CLEAN_BUILD "Select if clean target should be ON BOOL) +USER_OPTION(USE_SINGLE_INPUT "Select if a use case should execute using a default known input file" + OFF + BOOL) + if (NOT TARGET_PLATFORM STREQUAL native) USER_OPTION(CMSIS_SRC_PATH 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 @@ function(check_update_public_resources resource_downloaded_dir) 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 |