summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoralexander <alexander.efremov@arm.com>2021-05-12 19:06:02 +0100
committerKshitij Sisodia <kshitij-sisodia-arm@review.mlplatform.org>2021-05-18 08:31:49 +0000
commit50a0650cd3c804a89aa77815820a8df390245c2f (patch)
tree564d00dfe6db460926c36ef0309708304870d1c5 /scripts
parentddcb56d603ffa9cbff173d3c7066c2fa6f8d3c4c (diff)
downloadml-embedded-evaluation-kit-50a0650cd3c804a89aa77815820a8df390245c2f.tar.gz
MLECO-1873: default models are for 128 MAC config
Signed-off-by: alexander <alexander.efremov@arm.com> Change-Id: Ic3e940a9d289d649976c4e951ced1473fc31ff3f
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/util_functions.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/cmake/util_functions.cmake b/scripts/cmake/util_functions.cmake
index ecd9d2a..06ae184 100644
--- a/scripts/cmake/util_functions.cmake
+++ b/scripts/cmake/util_functions.cmake
@@ -23,11 +23,20 @@ function(USER_OPTION name description default type)
if (${type} STREQUAL PATH_OR_FILE)
if (DEFINED ${name})
+ get_filename_component(ABSPATH "${${name}}" ABSOLUTE BASE_DIR ${CMAKE_SOURCE_DIR})
+
get_path_type(${${name}} PATH_TYPE)
else()
+ get_filename_component(ABSPATH "${default}" ABSOLUTE BASE_DIR ${CMAKE_SOURCE_DIR})
+
get_path_type(${default} PATH_TYPE)
endif()
+ if (NOT EXISTS ${ABSPATH})
+ message(FATAL_ERROR
+ "Invalid directory or file path. Description: ${description}; Path: ${ABSPATH}")
+ endif()
+
# Set the default type if path is not a dir or file path (or undefined)
if (NOT ${PATH_TYPE} STREQUAL PATH AND NOT ${PATH_TYPE} STREQUAL FILEPATH)
message(FATAL_ERROR "Invalid ${name}. It should be a dir or file path.")