From b38cbd115b75672c84ec725d1acc0dc84422d85e Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Sun, 30 Jun 2019 15:41:52 -0400 Subject: buildsystem - replace option() with libical_option( libical_option() uses add_feature_info() ISSUE#393 --- cmake/modules/GtkDoc.cmake | 2 +- cmake/modules/LibIcalMacrosInternal.cmake | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake index dc907a9e..03a0c1dd 100644 --- a/cmake/modules/GtkDoc.cmake +++ b/cmake/modules/GtkDoc.cmake @@ -18,7 +18,7 @@ # It also adds custom target gtkdoc-rebuild-${_module}-sgml to rebuild the sgml.in # file based on the current sources. -option(ENABLE_GTK_DOC "Use gtk-doc to build documentation" True) +libical_option(ENABLE_GTK_DOC "Use gtk-doc to build documentation" True) if(NOT ENABLE_GTK_DOC) return() diff --git a/cmake/modules/LibIcalMacrosInternal.cmake b/cmake/modules/LibIcalMacrosInternal.cmake index 618a8279..cbea8155 100644 --- a/cmake/modules/LibIcalMacrosInternal.cmake +++ b/cmake/modules/LibIcalMacrosInternal.cmake @@ -3,6 +3,18 @@ include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) +function(libical_option option description) + set(extra_option_arguments ${ARGN}) + option(${option} "${description}" ${extra_option_arguments}) + add_feature_info("Option ${option}" ${option} "${description}") +endfunction() + +function(libical_deprecated_option deprecated_option option description) + set(extra_option_arguments ${ARGN}) + message(STATUS "WARNING: ${deprecated_option} is deprecated. Use ${option} instead") + libical_option(${option} "${description}" ${extra_option_arguments}) +endfunction() + function(libical_append_if condition value) if(${condition}) foreach(variable ${ARGN}) -- cgit v1.2.1