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
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 @@
 
 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