From de8eb2814bbe700e4cbe389f957bb1b5e54de688 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Mon, 22 Jun 2015 21:06:28 +0200 Subject: [PATCH] CMake: Require libgnutls by default. - Make cmake complain and abort the build process if libgnutls is not available. In order to build Taskwarrior without "sync" support, or to build it on a system with libgnutls missing, the new cmake flag "-DENABLE_SYNC=OFF" can be used. --- CMakeLists.txt | 13 ++++++++++++- ChangeLog | 13 ++++++++----- INSTALL | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88f0aa2b0..7da867003 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,14 @@ set (HAVE_CMAKE true) project (task) set (PROJECT_VERSION "2.4.5") -OPTION(USE_GNUTLS "Build gnutls support." ON) +OPTION (ENABLE_SYNC "Enable 'task sync' support" ON) + +if (ENABLE_SYNC) + set (USE_GNUTLS ON CACHE BOOL "Build gnutls support." FORCE) +else (ENABLE_SYNC) + set (USE_GNUTLS OFF CACHE BOOL "Build gnutls support." FORCE) + message (WARNING "ENABLE_SYNC=OFF. Not building sync support.") +endif (ENABLE_SYNC) message ("CMAKE_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}") @@ -116,6 +123,10 @@ if (USE_GNUTLS) endif (GNUTLS_FOUND) endif (USE_GNUTLS) +if (ENABLE_SYNC AND NOT GNUTLS_FOUND) + message (FATAL_ERROR "Cannot find GnuTLS. Use -DENABLE_SYNC=OFF to build Taskwarrior without sync support. See INSTALL for more information.") +endif (ENABLE_SYNC AND NOT GNUTLS_FOUND) + check_function_exists (timegm HAVE_TIMEGM) check_function_exists (get_current_dir_name HAVE_GET_CURRENT_DIR_NAME) check_function_exists (wordexp HAVE_WORDEXP) diff --git a/ChangeLog b/ChangeLog index 9902be40c..37ba7d0e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,27 +1,30 @@ 2.4.5 () - - TW-32 Unable to change annotations via task edit (thanks to Peter De -Poorter). + Poorter). - TW-50 Creation time is lost after editing (thanks to Ben Boeckel). - TW-148 default.command options (thanks to David Patrick). - TW-269 \t is not rendered correctly (thanks to Scott Kostyshak). - TW-283 Process rc.* items when executing config (thanks to Ben Armstrong). - TW-303 Ability for "import" to update existing tasks (thanks to Kosta -Harlan). + Harlan). - TW-1285 relative dates combined with times (thanks to Adam Gibbins). - TW-1432 start/stop can be issued on completed tasks (thanks to Renato Alves). - TW-1440 "task import" from STDIN (thanks to Renato Alves). - TW-1454 Redundant dependency should not stop modification (thanks to Tomas -Babej). + Babej). - TW-1572 Better urgency inheritance (thanks to Jens Erat). - Prevent potential task duplication during import for non-pending tasks. - Show the active context in "context list", if any is active. - Fix "task edit" dropping annotation text after newlines. - Removed obsolete script 'context'. - Fix "project" verbosity info not showing without "footnote" being manually -enabled. + enabled. - Internal plumbing: Use variadic templates for format(), reducing code bloat -and enabling more flexible use of the function. + and enabling more flexible use of the function. +- Enable "task sync" support by default. "cmake -DENABLE_SYNC=OFF" allows + disabling it and building Taskwarrior without libgnutls available. + ------ current release --------------------------- diff --git a/INSTALL b/INSTALL index 473ca3ddb..d684d32dc 100644 --- a/INSTALL +++ b/INSTALL @@ -91,6 +91,25 @@ get absolute installation directories: CMAKE_INSTALL_PREFIX/TASK_MAN5DIR /usr/local/share/man/man5 +"sync" command +-------------- + +In order to enable the "sync" command, you will need to have GnuTLS available. + +cmake may fail with the following error message: + "Cannot find GnuTLS. Use -DENABLE_SYNC=OFF to build Taskwarrior without + sync support. See INSTALL for more information." + +This means that it cannot find your GnuTLS installation, and you will need to +install GnuTLS as well as its header files. For Debian based distributions, +installing "libgnutls-dev" is usually sufficient. + +In order to build Taskwarrior without "sync" support, call cmake with the +"-DENABLE_SYNC=OFF" flag: + $ cmake . -DENABLE_SYNC=OFF +and proceed as described in "Basic Installation". + + Localizations -------------