From: Ralf Habacker Date: Mon, 18 May 2020 10:02:36 +0000 (+0200) Subject: cmake: rename tristateoption() to add_auto_option() and make signature compatible... X-Git-Tag: dbus-1.13.18~4^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab404c5ffb105940dd7cadeadd40176490bc7dcd;p=thirdparty%2Fdbus.git cmake: rename tristateoption() to add_auto_option() and make signature compatible to option() --- diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake index c594747e3..741d0c1c3 100644 --- a/cmake/modules/Macros.cmake +++ b/cmake/modules/Macros.cmake @@ -204,11 +204,11 @@ endmacro() # # provide option with three states AUTO, ON, OFF # -macro(tristateoption _name _default _text) +macro(add_auto_option _name _text _default) if(NOT DEFINED ${_name}) set(${_name} ${_default} CACHE STRING "${_text}" FORCE) else() set(${_name} ${_default} CACHE STRING "${_text}") endif() set_property(CACHE ${_name} PROPERTY STRINGS AUTO ON OFF) -endmacro(tristateoption) +endmacro() diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 1f47fa2ac..4ffe7779e 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -8,7 +8,7 @@ add_custom_target(doc ALL) if(DOXYGEN_EXECUTABLE) option(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON) - tristateoption(ENABLE_QT_HELP AUTO "build qt help documentation (requires qhelpgenerator(-qt5)); set INSTALL_QCH_DIR for custom qch installation path") + add_auto_option(ENABLE_QT_HELP "build qt help documentation (requires qhelpgenerator(-qt5)); set INSTALL_QCH_DIR for custom qch installation path" AUTO) endif() if(DBUS_ENABLE_DOXYGEN_DOCS)