From f8802cfd5faf182c55e31c2cab82bfade22975ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Tue, 24 Sep 2024 19:48:58 +0200 Subject: [PATCH] add docstring to option_string --- cmake/utils/option.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/utils/option.cmake b/cmake/utils/option.cmake index 1c66126..2649fb1 100644 --- a/cmake/utils/option.cmake +++ b/cmake/utils/option.cmake @@ -41,6 +41,18 @@ function(option_enum VARIABLE DESCRIPTION ENUM_VALUES DEFAULT) endif() endfunction() +#[[[ +# Create a CMake integer option that can be modified through CLI. +# Option defined this way will be visible in `cmake-gui` interface as well as SoCMake `help_options()` help menu. +# To override the variable use `cmake -D=` +# +# :param VARIABLE: name of the variable. +# :type VARIABLE: string +# :param DESCRIPTION: short description string for the variable +# :type DESCRIPTION: string +# :param DEFAULT: default value of the variable +# :type DEFAULT: string +#]] function(option_string VARIABLE DESCRIPTION DEFAULT) __define_socmake_option(${VARIABLE} "String" ${DESCRIPTION} ${DEFAULT})