diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index b75c029a516adf9ff6daf0001f80569944357352..8d2038aea8653dad57116aba973fc1f293cd255f 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -35,7 +35,7 @@ function(validate_option name values)
     if(${IDX_LOWER} LESS 0 AND ${IDX_UPPER} LESS 0)
         list_to_bulletpoints(POSSIBLE_VALUE_LIST ${${values}})
         message(FATAL_ERROR "\n########################################################################\n"
-                            "Invalid value '${${name}}' for option '${name}'\n"
+                            "Invalid value '${${name}}' for option ${name}\n"
                             "\n"
                             "Possible values are:\n"
                             "${POSSIBLE_VALUE_LIST}"