diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-11-23 17:19:52 +0000 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-11-23 17:19:52 +0000 |
commit | b59ba684aef4bef16262a1825e787a55fc992f0d (patch) | |
tree | 389e667ef3132727386e0800c0a63d676693185f /scripts/cmake/util_functions.cmake | |
parent | 37926c819f77a6fe9e3ae913486ac6fc78bd2bd0 (diff) | |
download | ml-embedded-evaluation-kit-b59ba684aef4bef16262a1825e787a55fc992f0d.tar.gz |
MLECO-1935: All common CMake user options consolidated.
For easier look up and maintenance, all common CMake user options
have been consolidated in one CMake file.
NOTE: the individual use case specific options are still within
the correspoinding use case CMake files.
Change-Id: Id887f7b2c763f4d3eb997d997cf466684d0089b6
Diffstat (limited to 'scripts/cmake/util_functions.cmake')
-rw-r--r-- | scripts/cmake/util_functions.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/cmake/util_functions.cmake b/scripts/cmake/util_functions.cmake index 06ae184..f9742f7 100644 --- a/scripts/cmake/util_functions.cmake +++ b/scripts/cmake/util_functions.cmake @@ -84,6 +84,15 @@ function(USER_OPTION name description default type) endfunction() + +# Function to check if a variable is defined, and throw +# an error if it is not. +function(assert_defined var_name) + if (NOT DEFINED ${var_name}) + message(FATAL_ERROR "ERROR: ${var_name} is undefined!") + endif() +endfunction() + # Function to get the path type for a variable # Args: # path_var[in]: path variable for which the cmake path type is requested |