diff --git a/.clang-format b/.clang-format index f5efb818..e5eaba03 100644 --- a/.clang-format +++ b/.clang-format @@ -81,21 +81,21 @@ ForEachMacros: IfMacros: IncludeBlocks: Regroup IncludeCategories: - - Regex: '(|)' - Priority: 3 - - Regex: '' + Priority: 3 - Regex: '") - set (include "$") - set_target_properties (${target_name} - PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES - "$<$:${interface_include}>;$<$:${include}>" - ) - unset (interface_include) - unset (include) - endif () - - unset (target_name) - endif () -endmacro () diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake deleted file mode 100644 index a21ff500..00000000 --- a/cmake/ccache.cmake +++ /dev/null @@ -1,73 +0,0 @@ -# -------------------------------------------------------------------------------------------------- -# Copyright (c) 2006-2023, Knut Reinert & Freie Universität Berlin -# Copyright (c) 2016-2023, Knut Reinert & MPI für molekulare Genetik -# This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License -# shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md -# -------------------------------------------------------------------------------------------------- - -cmake_minimum_required (VERSION 3.21) - -include (FindPackageMessage) - -# Uses `ccache` to cache build results. -# -# See also -# * https://ccache.dev/ -# * https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_LAUNCHER.html -macro (raptor_require_ccache) - option (RAPTOR_USE_CCACHE "Use ccache if available." ON) - option (RAPTOR_USE_CCACHE_IN_PARENT_PROJECT "Use ccache in parent project if available." OFF) - set (RAPTOR_FPROFILE_ABS_PATH "-fprofile-abs-path") - if (RAPTOR_USE_CCACHE) - find_program (CCACHE_PROGRAM ccache) - - if (NOT CCACHE_PROGRAM) - find_package_message (CCACHE_PROGRAM " Ccache program: not available" "[${CCACHE_PROGRAM}]") - else () - find_package_message (CCACHE_PROGRAM " Ccache program: available" "[${CCACHE_PROGRAM}]") - set (RAPTOR_FPROFILE_ABS_PATH "--ccache-skip -fprofile-abs-path") - - list (PREPEND CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") - list (PREPEND CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") - - # use ccache in external cmake projects - list (APPEND SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS - "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}" - ) - list (APPEND SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") - - list (PREPEND CMAKE_CXX_LINKER_LAUNCHER "${CCACHE_PROGRAM}") - list (PREPEND CMAKE_C_LINKER_LAUNCHER "${CCACHE_PROGRAM}") - list (APPEND SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_CXX_LINKER_LAUNCHER=${CMAKE_CXX_LINKER_LAUNCHER}") - list (APPEND SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_C_LINKER_LAUNCHER=${CMAKE_C_LINKER_LAUNCHER}") - endif () - - if (RAPTOR_USE_CCACHE_IN_PARENT_PROJECT) - set (RAPTOR_FPROFILE_ABS_PATH - ${RAPTOR_FPROFILE_ABS_PATH} - PARENT_SCOPE - ) - set (SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS - ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} - PARENT_SCOPE - ) - set (CMAKE_CXX_COMPILER_LAUNCHER - ${CMAKE_CXX_COMPILER_LAUNCHER} - PARENT_SCOPE - ) - set (CMAKE_C_COMPILER_LAUNCHER - ${CMAKE_C_COMPILER_LAUNCHER} - PARENT_SCOPE - ) - set (CMAKE_CXX_LINKER_LAUNCHER - ${CMAKE_CXX_LINKER_LAUNCHER} - PARENT_SCOPE - ) - set (CMAKE_C_LINKER_LAUNCHER - ${CMAKE_C_LINKER_LAUNCHER} - PARENT_SCOPE - ) - endif () - unset (CCACHE_PROGRAM) - endif () -endmacro () diff --git a/cmake/configuration.cmake b/cmake/configuration.cmake index d5f05100..337cbe53 100644 --- a/cmake/configuration.cmake +++ b/cmake/configuration.cmake @@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: 2016-2023, Knut Reinert & MPI für molekulare Genetik # SPDX-License-Identifier: BSD-3-Clause -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) # ---------------------------------------------------------------------------- # Short-circuit if Raptor is already configured @@ -30,18 +30,11 @@ macro (raptor_config_error text) message (FATAL_ERROR " ${text}") endmacro () -# ---------------------------------------------------------------------------- -# ccache -# ---------------------------------------------------------------------------- - -include (ccache) -raptor_require_ccache () - # ---------------------------------------------------------------------------- # CPM # ---------------------------------------------------------------------------- -set (CPM_INDENT " CMake Package Manager CPM: ") +set (CPM_INDENT "CMake Package Manager CPM: ") include (CPM) CPMUsePackageLock (${Raptor_SOURCE_DIR}/cmake/package-lock.cmake) @@ -49,12 +42,11 @@ CPMUsePackageLock (${Raptor_SOURCE_DIR}/cmake/package-lock.cmake) # Find or add dependencies # ---------------------------------------------------------------------------- -include (CPMGetSystemPackage) - -CPMGetSystemPackage (hibf) -CPMGetSystemPackage (sharg) -CPMGetSystemPackage (seqan3) -CPMGetSystemPackage (chopper) +CPMGetPackage (use_ccache) +CPMGetPackage (hibf) +CPMGetPackage (sharg) +CPMGetPackage (seqan3) +CPMGetPackage (chopper) # ---------------------------------------------------------------------------- # Find Raptor include path diff --git a/cmake/package-lock.cmake b/cmake/package-lock.cmake index 6ea0683e..96b8b97b 100644 --- a/cmake/package-lock.cmake +++ b/cmake/package-lock.cmake @@ -6,50 +6,56 @@ # This file should be committed to version control # hibf -set (RAPTOR_HIBF_VERSION 2075a68d10f571399b5ff885f0b4cb2c94845601) +set (RAPTOR_HIBF_VERSION 95c686c2a4147a364231aaeae88adbe93ce83181) CPMDeclarePackage (hibf NAME hibf GIT_TAG ${RAPTOR_HIBF_VERSION} GITHUB_REPOSITORY seqan/hibf SYSTEM TRUE + EXCLUDE_FROM_ALL TRUE OPTIONS "INSTALL_HIBF OFF" ) # sharg -set (RAPTOR_SHARG_VERSION 3e96d37387125bd876ace3fdd11a20039ed0d21c) +set (RAPTOR_SHARG_VERSION 39f65a4890f8c5108af2b5c7974893ff6ed87e50) CPMDeclarePackage (sharg NAME sharg GIT_TAG ${RAPTOR_SHARG_VERSION} GITHUB_REPOSITORY seqan/sharg-parser SYSTEM TRUE - OPTIONS "INSTALL_SHARG OFF" "INSTALL_TDL OFF" + EXCLUDE_FROM_ALL TRUE + OPTIONS "INSTALL_SHARG OFF" "INSTALL_TDL OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING" ) # seqan3 -set (RAPTOR_SEQAN3_VERSION 6268f1d11c58abf24c78c7f99a71817d13d5bddd) +set (RAPTOR_SEQAN3_VERSION f489f67d9aaa6e72dc42c59a1e5ef8fc27fec9d6) CPMDeclarePackage (seqan3 NAME seqan3 GIT_TAG ${RAPTOR_SEQAN3_VERSION} GITHUB_REPOSITORY seqan/seqan3 SYSTEM TRUE - OPTIONS "INSTALL_SEQAN3 OFF" + EXCLUDE_FROM_ALL TRUE + OPTIONS "INSTALL_SEQAN3 OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING" ) # chopper -set (RAPTOR_CHOPPER_VERSION bdcecb6d0f022778ae690da419654f26c7989d2c) +set (RAPTOR_CHOPPER_VERSION 4ff191e21def35cfd69e0242046f4b5188017a53) CPMDeclarePackage (chopper NAME chopper GIT_TAG ${RAPTOR_CHOPPER_VERSION} GITHUB_REPOSITORY seqan/chopper SYSTEM TRUE OPTIONS "CHOPPER_INSTALL OFF" "CHOPPER_BUILD_DOC OFF" "CHOPPER_BUILD_TEST OFF" + "CMAKE_MESSAGE_LOG_LEVEL WARNING" EXCLUDE_FROM_ALL TRUE ) # benchmark -set (RAPTOR_BENCHMARK_VERSION 1.8.2) +set (RAPTOR_BENCHMARK_VERSION 1.8.3) CPMDeclarePackage (benchmark NAME benchmark VERSION ${RAPTOR_BENCHMARK_VERSION} GITHUB_REPOSITORY google/benchmark SYSTEM TRUE + EXCLUDE_FROM_ALL TRUE OPTIONS "BENCHMARK_ENABLE_TESTING OFF" "BENCHMARK_ENABLE_WERROR OFF" + "CMAKE_MESSAGE_LOG_LEVEL WARNING" ) # googletest set (RAPTOR_GOOGLETEST_VERSION 1.14.0) @@ -58,5 +64,15 @@ CPMDeclarePackage (googletest VERSION ${RAPTOR_GOOGLETEST_VERSION} GITHUB_REPOSITORY google/googletest SYSTEM TRUE - OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" + OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING" +) +# use_ccache +set (USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37) +CPMDeclarePackage (use_ccache + NAME use_ccache + GIT_TAG ${USE_CCACHE_VERSION} + GITHUB_REPOSITORY seqan/cmake-scripts + SOURCE_SUBDIR ccache + SYSTEM TRUE + EXCLUDE_FROM_ALL TRUE ) diff --git a/cmake/raptor-package.cmake b/cmake/raptor-package.cmake index 827c61ca..4cae5064 100644 --- a/cmake/raptor-package.cmake +++ b/cmake/raptor-package.cmake @@ -7,7 +7,7 @@ # This file describes how Sharg will be packaged. -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) set (CPACK_GENERATOR "TXZ") diff --git a/include/raptor/argument_parsing/prepare_arguments.hpp b/include/raptor/argument_parsing/prepare_arguments.hpp index 67e4fc50..2b355b77 100644 --- a/include/raptor/argument_parsing/prepare_arguments.hpp +++ b/include/raptor/argument_parsing/prepare_arguments.hpp @@ -17,11 +17,11 @@ #include +#include + #include #include -#include - namespace raptor { diff --git a/include/raptor/argument_parsing/search_arguments.hpp b/include/raptor/argument_parsing/search_arguments.hpp index 024bed2d..ef714820 100644 --- a/include/raptor/argument_parsing/search_arguments.hpp +++ b/include/raptor/argument_parsing/search_arguments.hpp @@ -17,12 +17,12 @@ #include +#include + #include #include #include -#include - namespace raptor { diff --git a/include/raptor/index.hpp b/include/raptor/index.hpp index fe9675e7..77aba5fe 100644 --- a/include/raptor/index.hpp +++ b/include/raptor/index.hpp @@ -16,11 +16,11 @@ #include +#include + #include #include -#include - namespace raptor { diff --git a/include/raptor/search/search_singular_ibf.hpp b/include/raptor/search/search_singular_ibf.hpp index d8ee4004..361815ee 100644 --- a/include/raptor/search/search_singular_ibf.hpp +++ b/include/raptor/search/search_singular_ibf.hpp @@ -16,6 +16,8 @@ #include +#include + #include #include #include @@ -23,8 +25,6 @@ #include #include -#include - namespace raptor { diff --git a/include/raptor/search/sync_out.hpp b/include/raptor/search/sync_out.hpp index 76bf2437..2907b861 100644 --- a/include/raptor/search/sync_out.hpp +++ b/include/raptor/search/sync_out.hpp @@ -16,10 +16,10 @@ #include #include -#include - #include +#include + namespace raptor { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cb38a1af..a71704ec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (TARGET raptor) return () diff --git a/src/argument_parsing/CMakeLists.txt b/src/argument_parsing/CMakeLists.txt index ea7768f4..4d326cb1 100644 --- a/src/argument_parsing/CMakeLists.txt +++ b/src/argument_parsing/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (TARGET raptor_argument_parsing) return () diff --git a/src/argument_parsing/build_parsing.cpp b/src/argument_parsing/build_parsing.cpp index ee4d7230..54c7fb44 100644 --- a/src/argument_parsing/build_parsing.cpp +++ b/src/argument_parsing/build_parsing.cpp @@ -12,6 +12,10 @@ #include +#include + +#include + #include #include @@ -22,8 +26,6 @@ #include #include -#include - namespace raptor { diff --git a/src/argument_parsing/compute_bin_size.cpp b/src/argument_parsing/compute_bin_size.cpp index 3b15d497..e7cd0eb4 100644 --- a/src/argument_parsing/compute_bin_size.cpp +++ b/src/argument_parsing/compute_bin_size.cpp @@ -12,14 +12,14 @@ #include +#include + #include #include #include #include #include -#include - namespace raptor { diff --git a/src/build/CMakeLists.txt b/src/build/CMakeLists.txt index 568d0271..1889d38d 100644 --- a/src/build/CMakeLists.txt +++ b/src/build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (TARGET raptor_build) return () diff --git a/src/build/build_hibf.cpp b/src/build/build_hibf.cpp index 033baae9..f2ea4736 100644 --- a/src/build/build_hibf.cpp +++ b/src/build/build_hibf.cpp @@ -10,12 +10,12 @@ * \author Enrico Seiler */ +#include + #include #include #include -#include - namespace raptor { diff --git a/src/build/build_ibf.cpp b/src/build/build_ibf.cpp index 3a141666..3031413c 100644 --- a/src/build/build_ibf.cpp +++ b/src/build/build_ibf.cpp @@ -10,13 +10,13 @@ * \author Enrico Seiler */ +#include + #include #include #include #include -#include - namespace raptor { diff --git a/src/prepare/CMakeLists.txt b/src/prepare/CMakeLists.txt index 9e9d1f42..428ae3c3 100644 --- a/src/prepare/CMakeLists.txt +++ b/src/prepare/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (TARGET raptor_prepare) return () diff --git a/src/prepare/compute_minimiser.cpp b/src/prepare/compute_minimiser.cpp index d0d84071..8bb21387 100644 --- a/src/prepare/compute_minimiser.cpp +++ b/src/prepare/compute_minimiser.cpp @@ -14,16 +14,16 @@ #include #include +#include +#include +#include + #include #include #include #include #include -#include -#include -#include - namespace raptor { diff --git a/src/search/CMakeLists.txt b/src/search/CMakeLists.txt index 36b1adbe..5b3e53c7 100644 --- a/src/search/CMakeLists.txt +++ b/src/search/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (TARGET raptor_search) return () diff --git a/src/search/search_partitioned_ibf.cpp b/src/search/search_partitioned_ibf.cpp index 266da47a..bca75e7f 100644 --- a/src/search/search_partitioned_ibf.cpp +++ b/src/search/search_partitioned_ibf.cpp @@ -14,6 +14,8 @@ #include +#include + #include #include #include @@ -23,8 +25,6 @@ #include #include -#include - namespace raptor { diff --git a/src/threshold/CMakeLists.txt b/src/threshold/CMakeLists.txt index be87dc79..448ce7c4 100644 --- a/src/threshold/CMakeLists.txt +++ b/src/threshold/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (TARGET raptor_threshold) return () diff --git a/src/upgrade/CMakeLists.txt b/src/upgrade/CMakeLists.txt index 1748c658..a10c0e63 100644 --- a/src/upgrade/CMakeLists.txt +++ b/src/upgrade/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (TARGET raptor_upgrade) return () diff --git a/test/cmake/raptor_path_longest_stem.cmake b/test/cmake/raptor_path_longest_stem.cmake index 283ebae8..c8c8b4f8 100644 --- a/test/cmake/raptor_path_longest_stem.cmake +++ b/test/cmake/raptor_path_longest_stem.cmake @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) # A compatible function for cmake < 3.20 that basically returns `cmake_path (GET STEM LAST_ONLY )` function (raptor_path_longest_stem out_var filename) diff --git a/test/cmake/raptor_test_component.cmake b/test/cmake/raptor_test_component.cmake index ecd82589..e8555b4b 100644 --- a/test/cmake/raptor_test_component.cmake +++ b/test/cmake/raptor_test_component.cmake @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) include (raptor_path_longest_stem) diff --git a/test/coverage/CMakeLists.txt b/test/coverage/CMakeLists.txt index 9dfc6671..2db4e5c1 100644 --- a/test/coverage/CMakeLists.txt +++ b/test/coverage/CMakeLists.txt @@ -5,18 +5,18 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) project (raptor_test_coverage LANGUAGES CXX C) # Add a custom build type: Coverage set (CMAKE_CXX_FLAGS_COVERAGE - "${CMAKE_CXX_FLAGS_DEBUG} --coverage -fprofile-arcs -ftest-coverage ${RAPTOR_FPROFILE_ABS_PATH}" + "${CMAKE_CXX_FLAGS_DEBUG} --coverage -fprofile-arcs -ftest-coverage -fprofile-abs-path" CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE ) set (CMAKE_C_FLAGS_COVERAGE - "${CMAKE_C_FLAGS_DEBUG} --coverage -fprofile-arcs -ftest-coverage ${RAPTOR_FPROFILE_ABS_PATH}" + "${CMAKE_C_FLAGS_DEBUG} --coverage -fprofile-arcs -ftest-coverage -fprofile-abs-path" CACHE STRING "Flags used by the C compiler during coverage builds." FORCE ) set (CMAKE_EXE_LINKER_FLAGS_COVERAGE diff --git a/test/data/datasources.cmake b/test/data/datasources.cmake index ab2cf528..0dd7d593 100644 --- a/test/data/datasources.cmake +++ b/test/data/datasources.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) declare_internal_datasource (FILE bin1.fa URL ${CMAKE_CURRENT_LIST_DIR}/bin1.fa diff --git a/test/header/CMakeLists.txt b/test/header/CMakeLists.txt index 651fbb9f..16fe991a 100644 --- a/test/header/CMakeLists.txt +++ b/test/header/CMakeLists.txt @@ -5,15 +5,15 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) project (raptor_test_header LANGUAGES CXX C) include (../raptor-test.cmake) include (GoogleTest OPTIONAL) -CPMGetSystemPackage (benchmark) -CPMGetSystemPackage (googletest) +CPMGetPackage (benchmark) +CPMGetPackage (googletest) find_path (SEQAN3_TEST_CMAKE_MODULE_DIR NAMES seqan3_test_files.cmake diff --git a/test/include/raptor/test/cli_test.hpp b/test/include/raptor/test/cli_test.hpp index c3d14caf..306629c3 100644 --- a/test/include/raptor/test/cli_test.hpp +++ b/test/include/raptor/test/cli_test.hpp @@ -15,10 +15,10 @@ #include #include -#include - #include +#include + #ifndef RAPTOR_ASSERT_ZERO_EXIT # define RAPTOR_ASSERT_ZERO_EXIT(arg) ASSERT_EQ(arg.exit_code, 0) << "Command: " << arg.command #endif diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt index ecac661e..886ff2d4 100644 --- a/test/performance/CMakeLists.txt +++ b/test/performance/CMakeLists.txt @@ -5,12 +5,12 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) project (raptor_test_performance LANGUAGES CXX C) include (../raptor-test.cmake) -CPMGetSystemPackage (benchmark) +CPMGetPackage (benchmark) raptor_add_benchmark (bin_influence_benchmark.cpp) diff --git a/test/performance/bin_influence_benchmark.cpp b/test/performance/bin_influence_benchmark.cpp index 72e5f5eb..86aa64a0 100644 --- a/test/performance/bin_influence_benchmark.cpp +++ b/test/performance/bin_influence_benchmark.cpp @@ -15,12 +15,12 @@ #include #include -#include - #include #include #include +#include + #define USE_UNIT_TEST_PARAMETERS 1 static constexpr size_t operator""_MiB(unsigned long long int number) diff --git a/test/raptor-test.cmake b/test/raptor-test.cmake index 3153db6a..e2ab2a2b 100644 --- a/test/raptor-test.cmake +++ b/test/raptor-test.cmake @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) # ---------------------------------------------------------------------------- # Short-circuit if tests are already configured @@ -22,7 +22,6 @@ message (STATUS "${ColourBold}Configuring tests${ColourReset}") # ---------------------------------------------------------------------------- get_filename_component (RAPTOR_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE) -option (RAPTOR_USE_CCACHE_IN_PARENT_PROJECT "" ON) add_subdirectory ("${RAPTOR_ROOT_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/raptor") set_property (TARGET raptor PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") target_compile_options (raptor_raptor INTERFACE "-pedantic" "-Wall" "-Wextra" "-Werror") @@ -31,7 +30,7 @@ target_compile_options (raptor_raptor INTERFACE "-pedantic" "-Wall" "-Wextra" "- # CPM # ---------------------------------------------------------------------------- -set (CPM_INDENT " CMake Package Manager CPM: ") +set (CPM_INDENT "CMake Package Manager CPM: ") CPMUsePackageLock ("${CMAKE_CURRENT_LIST_DIR}/../cmake/package-lock.cmake") # ---------------------------------------------------------------------------- diff --git a/test/snippet/CMakeLists.txt b/test/snippet/CMakeLists.txt index d46d64bd..214f8000 100644 --- a/test/snippet/CMakeLists.txt +++ b/test/snippet/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) project (raptor_test_snippet LANGUAGES CXX C) include (../raptor-test.cmake) @@ -57,7 +57,7 @@ macro (raptor_snippets test_name_prefix snippet_base_path) endforeach () endmacro () -CPMGetSystemPackage (googletest) +CPMGetPackage (googletest) raptor_snippets ("snippet" "${CMAKE_CURRENT_SOURCE_DIR}") raptor_snippets ("doc/snippet" "${CMAKE_CURRENT_SOURCE_DIR}/../../doc") diff --git a/test/snippet/compare_snippet_output.cmake b/test/snippet/compare_snippet_output.cmake index 4e397418..82358a46 100644 --- a/test/snippet/compare_snippet_output.cmake +++ b/test/snippet/compare_snippet_output.cmake @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) include ("${CMAKE_CURRENT_LIST_DIR}/../cmake/raptor_path_longest_stem.cmake") diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 1e94da2e..cf2188a6 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -5,14 +5,14 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) project (raptor_test_unit LANGUAGES CXX C) include (../raptor-test.cmake) include (GoogleTest OPTIONAL) -CPMGetSystemPackage (googletest) +CPMGetPackage (googletest) add_subdirectory (api) add_subdirectory (cli) diff --git a/test/unit/api/CMakeLists.txt b/test/unit/api/CMakeLists.txt index 9d75b77e..5653ed90 100644 --- a/test/unit/api/CMakeLists.txt +++ b/test/unit/api/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) raptor_add_unit_test (issue_142.cpp) raptor_add_unit_test (formatted_bytes.cpp) diff --git a/test/unit/cli/CMakeLists.txt b/test/unit/cli/CMakeLists.txt index 269031d6..50de2758 100644 --- a/test/unit/cli/CMakeLists.txt +++ b/test/unit/cli/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) add_subdirectory (argument_parsing) add_subdirectory (build) diff --git a/test/unit/cli/argument_parsing/CMakeLists.txt b/test/unit/cli/argument_parsing/CMakeLists.txt index 612f0dee..e82fc358 100644 --- a/test/unit/cli/argument_parsing/CMakeLists.txt +++ b/test/unit/cli/argument_parsing/CMakeLists.txt @@ -5,6 +5,6 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) raptor_add_unit_test (options_test.cpp) diff --git a/test/unit/cli/argument_parsing/options_test.cpp b/test/unit/cli/argument_parsing/options_test.cpp index 0af1f1e1..40fa3ea9 100644 --- a/test/unit/cli/argument_parsing/options_test.cpp +++ b/test/unit/cli/argument_parsing/options_test.cpp @@ -84,9 +84,8 @@ TEST_F(argparse_search, no_options) TEST_F(argparse_main, no_subparser) { cli_test_result const result = execute_app("raptor", "foo"); - std::string const expected{ - "[Error] You misspelled the subcommand! Please specify which sub-program you want to use: one " - "of [build, layout, prepare, search, upgrade]. Use -h/--help for more information.\n"}; + std::string const expected{"[Error] You specified an unknown subcommand! Available subcommands are: " + "[build, layout, prepare, search, upgrade]. Use -h/--help for more information.\n"}; EXPECT_EQ(result.out, std::string{}); EXPECT_EQ(result.err, expected); RAPTOR_ASSERT_FAIL_EXIT(result); @@ -96,8 +95,8 @@ TEST_F(argparse_main, unknown_option) { cli_test_result const result = execute_app("raptor", "-v"); std::string const expected{ - "[Error] You misspelled the subcommand! Please specify which sub-program you want to use: one " - "of [build, layout, prepare, search, upgrade]. Use -h/--help for more information.\n"}; + "[Error] Unknown option -v. In case this is meant to be a non-option/argument/parameter, " + "please specify the start of non-options with '--'. See -h/--help for program information.\n"}; EXPECT_EQ(result.out, std::string{}); EXPECT_EQ(result.err, expected); RAPTOR_ASSERT_FAIL_EXIT(result); diff --git a/test/unit/cli/build/CMakeLists.txt b/test/unit/cli/build/CMakeLists.txt index 433c817d..d3acd170 100644 --- a/test/unit/cli/build/CMakeLists.txt +++ b/test/unit/cli/build/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) raptor_add_unit_test (build_hibf_chopper_test.cpp) raptor_add_unit_test (build_hibf_test.cpp) diff --git a/test/unit/cli/search/CMakeLists.txt b/test/unit/cli/search/CMakeLists.txt index dc49b9c7..fdc6e075 100644 --- a/test/unit/cli/search/CMakeLists.txt +++ b/test/unit/cli/search/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) raptor_add_unit_test (search_hibf_test.cpp) raptor_add_unit_test (search_hibf_preprocessing_test.cpp) diff --git a/test/unit/cli/upgrade/CMakeLists.txt b/test/unit/cli/upgrade/CMakeLists.txt index daf7e63e..63befa33 100644 --- a/test/unit/cli/upgrade/CMakeLists.txt +++ b/test/unit/cli/upgrade/CMakeLists.txt @@ -5,6 +5,6 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) # raptor_add_unit_test (upgrade_test.cpp) diff --git a/test/util/collect_compile_stats.sh b/test/util/collect_compile_stats.sh index 6990d440..76a5a9cb 100755 --- a/test/util/collect_compile_stats.sh +++ b/test/util/collect_compile_stats.sh @@ -26,7 +26,7 @@ reset_scripts() { trap reset_scripts EXIT # Run in a subshell `(...)` to `set -x` just for one command. -(set -ex; cmake $SCRIPT_DIR/../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$SCRIPT_DIR/g++.sh -DCMAKE_C_COMPILER=$SCRIPT_DIR/gcc.sh -DRAPTOR_USE_CCACHE=OFF -DHIBF_NATIVE_BUILD=ON) +(set -ex; cmake $SCRIPT_DIR/../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$SCRIPT_DIR/g++.sh -DCMAKE_C_COMPILER=$SCRIPT_DIR/gcc.sh -DUSE_CCACHE=OFF -DHIBF_NATIVE_BUILD=ON) # We need `DO_TIME=0` for the CMake configuration to work, but `DO_TIME=1` to actually measure time/RAM consumption. sed -i "s/DO_TIME=0/DO_TIME=1/" $SCRIPT_DIR/gcc.sh diff --git a/util/applications/src/CMakeLists.txt b/util/applications/src/CMakeLists.txt index ce36ae4e..dc3b1388 100644 --- a/util/applications/src/CMakeLists.txt +++ b/util/applications/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) project (raptor_utility_common LANGUAGES CXX) @@ -11,7 +11,6 @@ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") get_filename_component (RAPTOR_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE) -option (RAPTOR_USE_CCACHE_IN_PARENT_PROJECT "" ON) add_subdirectory ("${RAPTOR_ROOT_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/raptor") add_library (utility_common INTERFACE) diff --git a/util/applications/src/Genome_Biology/CMakeLists.txt b/util/applications/src/Genome_Biology/CMakeLists.txt index 5362c061..0732f575 100644 --- a/util/applications/src/Genome_Biology/CMakeLists.txt +++ b/util/applications/src/Genome_Biology/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (NOT TARGET fasta_to_fastq) add_executable ("fasta_to_fastq" fasta_to_fastq.cpp) diff --git a/util/applications/src/Genome_Biology/compare_to_truth.cpp b/util/applications/src/Genome_Biology/compare_to_truth.cpp index ef61ec40..35863a15 100644 --- a/util/applications/src/Genome_Biology/compare_to_truth.cpp +++ b/util/applications/src/Genome_Biology/compare_to_truth.cpp @@ -19,8 +19,6 @@ #include -// #include - struct parser_options { std::filesystem::path result_file{}; diff --git a/util/applications/src/iScience/CMakeLists.txt b/util/applications/src/iScience/CMakeLists.txt index 8ee7044e..2c798099 100644 --- a/util/applications/src/iScience/CMakeLists.txt +++ b/util/applications/src/iScience/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) if (NOT TARGET generate_reads) add_executable ("generate_reads" generate_reads.cpp) diff --git a/util/applications/src/iScience/count_minimiser.cpp b/util/applications/src/iScience/count_minimiser.cpp index 1188fea0..1af3fef4 100644 --- a/util/applications/src/iScience/count_minimiser.cpp +++ b/util/applications/src/iScience/count_minimiser.cpp @@ -13,15 +13,15 @@ #include -#include -#include -#include - #include #include #include #include +#include +#include +#include + struct config { uint32_t window_size{}; diff --git a/util/applications/src/iScience/threshold_info.cpp b/util/applications/src/iScience/threshold_info.cpp index 4171b0fd..f4893286 100644 --- a/util/applications/src/iScience/threshold_info.cpp +++ b/util/applications/src/iScience/threshold_info.cpp @@ -15,6 +15,9 @@ #include #include +#include +#include + #include #include #include @@ -23,9 +26,6 @@ #include #include -#include -#include - void threshold_info(raptor::search_arguments const & arguments, std::string const & shape_string) { uint8_t const kmer_size{arguments.shape.size()}; diff --git a/util/iScience/CMakeLists.txt b/util/iScience/CMakeLists.txt index 094ffa97..f6f20c1e 100644 --- a/util/iScience/CMakeLists.txt +++ b/util/iScience/CMakeLists.txt @@ -5,14 +5,13 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") get_filename_component (RAPTOR_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) -option (RAPTOR_USE_CCACHE_IN_PARENT_PROJECT "" ON) add_subdirectory ("${RAPTOR_ROOT_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/raptor") # Define cmake configuration flags to configure and build external projects with the same flags as specified for diff --git a/util/iScience/thresholding/CMakeLists.txt b/util/iScience/thresholding/CMakeLists.txt index f6f8e4bf..3a4919e7 100644 --- a/util/iScience/thresholding/CMakeLists.txt +++ b/util/iScience/thresholding/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) # Define the application name. project (minimizer_thresholds LANGUAGES CXX C) @@ -27,8 +27,8 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") include (${CMAKE_CURRENT_LIST_DIR}/../../../cmake/CPM.cmake) CPMUsePackageLock (${CMAKE_CURRENT_LIST_DIR}/../../../cmake/package-lock.cmake) -CPMGetSystemPackage (sharg) -CPMGetSystemPackage (seqan3) +CPMGetPackage (sharg) +CPMGetPackage (seqan3) add_library (common_thresholding INTERFACE) target_link_libraries ("common_thresholding" INTERFACE seqan3::seqan3 sharg::sharg) diff --git a/util/test/CMakeLists.txt b/util/test/CMakeLists.txt index aa544898..61013d73 100644 --- a/util/test/CMakeLists.txt +++ b/util/test/CMakeLists.txt @@ -5,7 +5,7 @@ # shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md # -------------------------------------------------------------------------------------------------- -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.25) project (raptor_utility_test) @@ -14,7 +14,6 @@ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") get_filename_component (RAPTOR_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) -option (RAPTOR_USE_CCACHE_IN_PARENT_PROJECT "" ON) add_subdirectory ("${RAPTOR_ROOT_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/raptor") target_compile_options (raptor_raptor INTERFACE "-pedantic" "-Wall" "-Wextra" "-Werror")