diff --git a/CHANGELOG.md b/CHANGELOG.md index fa091949c8..a32fa03155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ If possible, provide tooling that performs the changes, e.g. a shell-script. #### Dependencies * We now use Doxygen version 1.9.8 to build our documentation ([\#3197](https://github.com/seqan/seqan3/pull/3197)). + * We bumped the minimal CMake version to 3.5 ([\#3223](https://github.com/seqan/seqan3/pull/3223)). # 3.3.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index f28c478728..5a3e9f080c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ # SeqAn3. To build tests, run cmake on one of the sub-folders in this directory # which contain a CMakeLists.txt. -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) find_path (SEQAN3_MODULE_PATH "seqan3-config.cmake" HINTS "${CMAKE_CURRENT_LIST_DIR}/build_system/") list (APPEND CMAKE_MODULE_PATH "${SEQAN3_MODULE_PATH}") diff --git a/README.md b/README.md index 1ca254d79a..556b22dbcf 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Please see the [online documentation](https://docs.seqan.de/seqan/3-master-user/ | | requirement | version | comment | |-------------------|------------------------------------------------------|----------|---------------------------------------------| |**compiler** | [GCC](https://gcc.gnu.org) | ≥ 11 | no other compiler is currently supported! | -|**build system** | [CMake](https://cmake.org) | ≥ 3.4 | optional, but recommended | +|**build system** | [CMake](https://cmake.org) | ≥ 3.5 | optional, but recommended | |**required libs** | [SDSL](https://github.com/xxsds/sdsl-lite) | ≥ 3.0.3 | | |**optional libs** | [cereal](https://github.com/USCiLab/cereal) | ≥ 1.3.1 | required for serialisation and CTD support | | | [zlib](https://github.com/madler/zlib) | ≥ 1.2 | required for `*.gz` and `.bam` file support | diff --git a/build_system/seqan3-config.cmake b/build_system/seqan3-config.cmake index 37f24a6c0d..67bbe6dedd 100644 --- a/build_system/seqan3-config.cmake +++ b/build_system/seqan3-config.cmake @@ -64,7 +64,7 @@ # # ============================================================================ -cmake_minimum_required (VERSION 3.4...3.12) +cmake_minimum_required (VERSION 3.5...3.12) # ---------------------------------------------------------------------------- # Set initial variables diff --git a/doc/setup/quickstart_cmake/index.md b/doc/setup/quickstart_cmake/index.md index eec7fa2455..ad376dfc33 100644 --- a/doc/setup/quickstart_cmake/index.md +++ b/doc/setup/quickstart_cmake/index.md @@ -13,7 +13,7 @@ works. # Software Requirements: - gcc >= 11 - - cmake >= 3.4 + - cmake >= 3.5 - git ## Installing GCC diff --git a/test/external_project/CMakeLists.txt b/test/external_project/CMakeLists.txt index c9bb477b08..eb87d0108f 100644 --- a/test/external_project/CMakeLists.txt +++ b/test/external_project/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md # ----------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) project (seqan3_test_external_project CXX) include (../seqan3-test.cmake) # for SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS, SEQAN3_VERSION @@ -21,9 +21,9 @@ endif () option (SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE "Enable this option if you want to get a detailed list which paths were considered for find_package(...)" false) -if (NOT ${CMAKE_VERSION} VERSION_LESS 3.14) # cmake 3.14 version is needed to install cmake 3.4. +if (NOT ${CMAKE_VERSION} VERSION_LESS 3.14) # cmake 3.14 version is needed to install cmake 3.5. set (SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND "${CMAKE_COMMAND}") - include (use-cmake3.4.cmake) # ensure that seqan3 can be used with cmake 3.4 + include (use-cmake3.5.cmake) # ensure that seqan3 can be used with cmake 3.5 else () set (SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND "${CMAKE_COMMAND}") endif () @@ -39,16 +39,16 @@ endif () # fetch_content # # If your current CMake version is >= 3.14, we -# * download CMake 3.4 -# * test test/external_project/seqan3_submodule_add_subdirectory/CMakeLists.txt with CMake 3.4 -# * test test/external_project/seqan3_submodule_find_package/CMakeLists.txt with CMake 3.4 -# * test test/external_project/seqan3_installed/CMakeLists.txt with CMake 3.4 +# * download CMake 3.5 +# * test test/external_project/seqan3_submodule_add_subdirectory/CMakeLists.txt with CMake 3.5 +# * test test/external_project/seqan3_submodule_find_package/CMakeLists.txt with CMake 3.5 +# * test test/external_project/seqan3_installed/CMakeLists.txt with CMake 3.5 # * test test/external_project/seqan3_fetch_content_zip/CMakeLists.txt with your current CMake version # 1) This tests test/external_project/seqan3_submodule_add_subdirectory/CMakeLists.txt # That means we use add_subdirectory directly on seqan3's top level CMakeLists.txt. # This will automatically call find_package and expose our seqan3::seqan3 target. -# This is expected to work with CMake >= 3.4. +# This is expected to work with CMake >= 3.5. # (ExternalProject_Add simulates a fresh and separate invocation of cmake ../) ExternalProject_Add ( seqan3_submodule_add_subdirectory @@ -62,7 +62,7 @@ ExternalProject_Add ( # 2) This tests test/external_project/seqan3_submodule_find_package/CMakeLists.txt # We have a seqan3 checkout somewhere and we point CMAKE_PREFIX_PATH to /seqan3/build_system # and then use `find_package` to find `seqan3-config.cmake` which exposes our `seqan3::seqan3` target. -# This is expected to work with CMake >= 3.4. +# This is expected to work with CMake >= 3.5. # (ExternalProject_Add simulates a fresh and separate invocation of cmake ../) ExternalProject_Add ( seqan3_submodule_find_package @@ -82,7 +82,7 @@ ExternalProject_Add ( # https://github.com/seqan/seqan3/releases, and unzipping it to some folder and making # that path globally accessible by CMAKE_SYSTEM_PREFIX_PATH. # We need CMake >= 3.14 to be able to package seqan3, but we actually expect that this -# test works with CMake >= 3.4. +# test works with CMake >= 3.5. # (ExternalProject_Add simulates a fresh and separate invocation of cmake ../) if (NOT ${CMAKE_VERSION} VERSION_LESS 3.14) # cmake 3.14 version is needed to install seqan3. ExternalProject_Add ( diff --git a/test/external_project/seqan3_installed/CMakeLists.txt b/test/external_project/seqan3_installed/CMakeLists.txt index c96d635ea8..5b43cda3f8 100644 --- a/test/external_project/seqan3_installed/CMakeLists.txt +++ b/test/external_project/seqan3_installed/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md # ----------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) project (seqan3_app CXX) # --- helper scripts diff --git a/test/external_project/seqan3_setup_tutorial/CMakeLists.txt b/test/external_project/seqan3_setup_tutorial/CMakeLists.txt index 2678684bb2..1a3273811b 100644 --- a/test/external_project/seqan3_setup_tutorial/CMakeLists.txt +++ b/test/external_project/seqan3_setup_tutorial/CMakeLists.txt @@ -17,7 +17,7 @@ file (COPY "${CMAKE_SOURCE_DIR}/../src/hello_world.cpp" DESTINATION "${CMAKE_CUR set (CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../source") ## [adding_files] -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) project (seqan3_tutorial CXX) # add seqan3 to search path diff --git a/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt b/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt index b94ea8fae6..1dd0dad1a7 100644 --- a/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt +++ b/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt @@ -19,7 +19,7 @@ set (CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../source") list (APPEND CMAKE_PREFIX_PATH "${SHARG_ROOT}/build_system") ## [adding_files] -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) project (seqan3_tutorial CXX) # add seqan3 to search path diff --git a/test/external_project/seqan3_setup_tutorial_with_sharg_installed/CMakeLists.txt b/test/external_project/seqan3_setup_tutorial_with_sharg_installed/CMakeLists.txt index 74341532cc..5f9403f071 100644 --- a/test/external_project/seqan3_setup_tutorial_with_sharg_installed/CMakeLists.txt +++ b/test/external_project/seqan3_setup_tutorial_with_sharg_installed/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md # ----------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) project (seqan3_app CXX) # --- helper scripts diff --git a/test/external_project/seqan3_submodule_add_subdirectory/CMakeLists.txt b/test/external_project/seqan3_submodule_add_subdirectory/CMakeLists.txt index d1e6c3b8c2..f9e9f87eb3 100644 --- a/test/external_project/seqan3_submodule_add_subdirectory/CMakeLists.txt +++ b/test/external_project/seqan3_submodule_add_subdirectory/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md # ----------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) project (seqan3_app CXX) # --- helper scripts diff --git a/test/external_project/seqan3_submodule_find_package/CMakeLists.txt b/test/external_project/seqan3_submodule_find_package/CMakeLists.txt index 1f2f859fcc..98c3c9d55d 100644 --- a/test/external_project/seqan3_submodule_find_package/CMakeLists.txt +++ b/test/external_project/seqan3_submodule_find_package/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md # ----------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.4) +cmake_minimum_required (VERSION 3.5) project (seqan3_app CXX) # --- helper scripts diff --git a/test/external_project/use-cmake3.4.cmake b/test/external_project/use-cmake3.5.cmake similarity index 55% rename from test/external_project/use-cmake3.4.cmake rename to test/external_project/use-cmake3.5.cmake index bc3f9ca49e..d3d9135fef 100644 --- a/test/external_project/use-cmake3.4.cmake +++ b/test/external_project/use-cmake3.5.cmake @@ -10,26 +10,26 @@ project (seqan3_test_seqan3_config CXX) # require Linux and x86_64 if (NOT (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 8)) - message (STATUS "cmake 3.4 test requires Linux and x86_64") + message (STATUS "cmake 3.5 test requires Linux and x86_64") return () endif () include (FetchContent) FetchContent_Declare ( - cmake34 - URL "https://github.com/Kitware/CMake/releases/download/v3.4.3/cmake-3.4.3-Linux-x86_64.tar.gz" + cmake35 + URL "https://github.com/Kitware/CMake/releases/download/v3.5.2/cmake-3.5.2-Linux-x86_64.tar.gz" URL_HASH "SHA256=66b8d315c852908be9f79e1a18b8778714659fce4ddb2d041af8680a239202fc") -FetchContent_MakeAvailable (cmake34) +FetchContent_MakeAvailable (cmake35) -set (cmake34_command "${cmake34_SOURCE_DIR}/bin/cmake") +set (cmake35_command "${cmake35_SOURCE_DIR}/bin/cmake") -execute_process (COMMAND ${cmake34_command} --version - RESULT_VARIABLE cmake34_result - OUTPUT_VARIABLE cmake34_output) +execute_process (COMMAND ${cmake35_command} --version + RESULT_VARIABLE cmake35_result + OUTPUT_VARIABLE cmake35_output) -if ("${cmake34_result}" STREQUAL "0" AND cmake34_output MATCHES "cmake version 3.4.3") - set (SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND "${cmake34_command}") - message (STATUS "Use cmake3.4 in tests [${cmake34_command}]") +if ("${cmake35_result}" STREQUAL "0" AND cmake35_output MATCHES "cmake version 3.5.2") + set (SEQAN3_EXTERNAL_PROJECT_CMAKE_COMMAND "${cmake35_command}") + message (STATUS "Use cmake3.5 in tests [${cmake35_command}]") else () - message (AUTHOR_WARNING "Couldn't execute cmake3.4 --version [${cmake34_command}]") + message (AUTHOR_WARNING "Couldn't execute cmake3.5 --version [${cmake35_command}]") endif ()