diff --git a/CMakeLists.txt b/CMakeLists.txt index 36ba9a79a..8106810b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ -cmake_minimum_required (VERSION 2.8) -set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required +cmake_minimum_required (VERSION 3.0) set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") include (CheckFunctionExists) diff --git a/DEVELOPER.md b/DEVELOPER.md index ae9fa00f9..c20a32767 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -1,7 +1,8 @@ # How to Build Taskwarrior ## Satisfy the Requirements: - * gcc 4.9 or later, clang 3.4 or later, or a compiler with full C++11 support. + * CMake 3.0 or later + * gcc 5.0 or later, clang 3.4 or later, or a compiler with full C++11 support * libuuid (if not on macOS) * gnutls (optional) * python 2.7 or 3 (optional, for running the test suite) diff --git a/INSTALL b/INSTALL index 02fe9434e..52d9b1a60 100644 --- a/INSTALL +++ b/INSTALL @@ -8,14 +8,14 @@ source. Dependencies ------------ -You will need the CMake build system installed in order to build Taskwarrior +You will need the CMake 3.0+ build system installed in order to build Taskwarrior from source. More information on CMake can be obtained at https://cmake.org You will also need: - make You will need a C++ compiler that supports full C++11, which includes: - - gcc 4.9 (released 2014-04-22) + - gcc 5.0 (released 2013-12-23) - clang 3.4 (released 2014-01-02) You will need the following libraries: diff --git a/README.md b/README.md index 07ff0031f..49bea6097 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,13 @@ There are many binary packages available, but to install from source requires: * git * cmake * make -* C++ compiler, currently gcc 4.7+ or clang 3.3+ for full C++11 support +* C++ compiler, currently gcc 5.0+ or clang 3.4+ for full C++11 support Download the tarball, and expand it: - $ curl -O https://taskwarrior.org/download/task-2.5.1.tar.gz - $ tar xzf task-2.5.1.tar.gz - $ cd task-2.5.1 + $ curl -O https://taskwarrior.org/download/task-2.6.0.tar.gz + $ tar xzf task-2.6.0.tar.gz + $ cd task-2.6.0 Or clone this repository: diff --git a/cmake/CXXSniffer.cmake b/cmake/CXXSniffer.cmake index e7ad810ac..4fe1e6e90 100644 --- a/cmake/CXXSniffer.cmake +++ b/cmake/CXXSniffer.cmake @@ -1,30 +1,21 @@ -message ("-- Configuring C++11") +message ("-- Configuring C++14") message ("-- System: ${CMAKE_SYSTEM_NAME}") include (CheckCXXCompilerFlag) -# NOTE: Phase out -std=gnu++0x and --std=c++0x as soon as realistically possible. -CHECK_CXX_COMPILER_FLAG("-std=c++11" _HAS_CXX11) -CHECK_CXX_COMPILER_FLAG("-std=c++0x" _HAS_CXX0X) -CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" _HAS_GNU0X) +CHECK_CXX_COMPILER_FLAG("-std=c++14" _HAS_CXX14) -if (_HAS_CXX11) - set (_CXX11_FLAGS "-std=c++11") -elseif (_HAS_CXX0X) - message (WARNING "Enabling -std=c++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.") - set (_CXX11_FLAGS "-std=c++0x") -elseif (_HAS_GNU0X) - message (WARNING "Enabling -std=gnu++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.") - set (_CXX11_FLAGS "-std=gnu++0x") -else (_HAS_CXX11) - message (FATAL_ERROR "C++11 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@gothenburgbitfactory.org.") -endif (_HAS_CXX11) +if (_HAS_CXX14) + set (_CXX14_FLAGS "-std=c++14") +else (_HAS_CXX14) + message (FATAL_ERROR "C++14 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@gothenburgbitfactory.org.") +endif (_HAS_CXX14) if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set (LINUX true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set (DARWIN true) - set (_CXX11_FLAGS "${_CXX11_FLAGS} -stdlib=libc++") + set (_CXX14_FLAGS "${_CXX14_FLAGS} -stdlib=libc++") elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") set (KFREEBSD true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") @@ -41,13 +32,9 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "GNU") set (GNUHURD true) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "CYGWIN") set (CYGWIN true) - # NOTE: Not setting -std=gnu++0x leads to compile errors even with - # GCC 4.8.3, and debugging those leads to insanity. Adding this - # workaround instead of fixing Cygwin. - set (_CXX11_FLAGS "-std=gnu++0x") else (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set (UNKNOWN true) endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") -set (CMAKE_CXX_FLAGS "${_CXX11_FLAGS} ${CMAKE_CXX_FLAGS}") +set (CMAKE_CXX_FLAGS "${_CXX14_FLAGS} ${CMAKE_CXX_FLAGS}") set (CMAKE_CXX_FLAGS "-Wall -Wextra -Wsign-compare -Wreturn-type ${CMAKE_CXX_FLAGS}") diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index a0072349d..81df9d08f 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.0) message ("-- Configuring man pages") set (man_FILES task-color.5 task-sync.5 taskrc.5 task.1) foreach (man_FILE ${man_FILES}) diff --git a/performance/CMakeLists.txt b/performance/CMakeLists.txt index 792e7f10b..a990911fe 100644 --- a/performance/CMakeLists.txt +++ b/performance/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.0) add_custom_target (performance ./run_perf DEPENDS task_executable diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index edc8e2eb5..e6ac28d12 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.0) install (DIRECTORY bash fish vim zsh hooks DESTINATION ${TASK_DOCDIR}/scripts) install (DIRECTORY add-ons diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aab09d2f0..1dc0a055a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.0) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/commands diff --git a/src/columns/CMakeLists.txt b/src/columns/CMakeLists.txt index 002982bbb..79fc10af0 100644 --- a/src/columns/CMakeLists.txt +++ b/src/columns/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.0) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/commands diff --git a/src/commands/CMakeLists.txt b/src/commands/CMakeLists.txt index 188a8ef81..668f5c2f1 100644 --- a/src/commands/CMakeLists.txt +++ b/src/commands/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.0) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/commands diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bf361ef77..3e34ef778 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.0) # See this CMake issue before complaining about the following. # https://cmake.org/Bug/view.php?id=16062