summaryrefslogtreecommitdiffstats
path: root/cmake/AutoOption.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/AutoOption.cmake')
-rw-r--r--cmake/AutoOption.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/AutoOption.cmake b/cmake/AutoOption.cmake
index 3f7cdee0e..d25ea17b8 100644
--- a/cmake/AutoOption.cmake
+++ b/cmake/AutoOption.cmake
@@ -42,3 +42,8 @@ function(enum_option name init description)
endforeach()
message(FATAL_ERROR "${name} must be one of ${enums}")
endfunction()
+
+function(advanced_option name description default)
+ option(${name} ${description} ${default})
+ mark_as_advanced(${name})
+endfunction()