diff options
author | Allen Winter <allen.winter@kdab.com> | 2019-06-30 15:41:52 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2019-06-30 15:41:52 -0400 |
commit | b38cbd115b75672c84ec725d1acc0dc84422d85e (patch) | |
tree | c1d4f278956c4c4be4087e6f98abd0d723d2be96 /cmake | |
parent | b10cc68939c4660ec2d3e54c8278f46e9a13bf9a (diff) | |
download | libical-git-b38cbd115b75672c84ec725d1acc0dc84422d85e.tar.gz |
buildsystem - replace option() with libical_option(
libical_option() uses add_feature_info()
ISSUE#393
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/GtkDoc.cmake | 2 | ||||
-rw-r--r-- | cmake/modules/LibIcalMacrosInternal.cmake | 12 |
2 files changed, 13 insertions, 1 deletions
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}) |