Skip to content

Commit

Permalink
Merge pull request #3291 from eseiler/infra/cmake
Browse files Browse the repository at this point in the history
[INFRA] Acknowledge CMake 3.30 policies
  • Loading branch information
eseiler authored Oct 14, 2024
2 parents 31886fe + 124cfe7 commit 30bdf8d
Show file tree
Hide file tree
Showing 43 changed files with 43 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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.5)
cmake_minimum_required (VERSION 3.5...3.30)

find_path (SEQAN3_MODULE_PATH "seqan3-config.cmake" HINTS "${CMAKE_CURRENT_LIST_DIR}/build_system/")
list (APPEND CMAKE_MODULE_PATH "${SEQAN3_MODULE_PATH}")
Expand Down
2 changes: 1 addition & 1 deletion build_system/seqan3-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#
# ============================================================================

cmake_minimum_required (VERSION 3.5...3.12)
cmake_minimum_required (VERSION 3.5...3.30)

# ----------------------------------------------------------------------------
# Set initial variables
Expand Down
2 changes: 1 addition & 1 deletion build_system/seqan3-install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# This file describes where and which parts of SeqAn3 should be installed to.

cmake_minimum_required (VERSION 3.14)
cmake_minimum_required (VERSION 3.14...3.30)

include (GNUInstallDirs)

Expand Down
2 changes: 1 addition & 1 deletion build_system/seqan3-package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# This file describes how SeqAn3 will be packaged.

cmake_minimum_required (VERSION 3.7)
cmake_minimum_required (VERSION 3.7...3.30)

set (CPACK_GENERATOR "TXZ")

Expand Down
2 changes: 1 addition & 1 deletion doc/setup/quickstart_cmake/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ For example, after adding `another_program.cpp` your `CMakeLists.txt` may look l
# Including SeqAn3 as external project

```cmake
cmake_minimum_required (VERSION 3.14)
cmake_minimum_required (VERSION 3.14...3.30)
project (my_app LANGUAGES CXX VERSION 1.0.0)
Expand Down
2 changes: 1 addition & 1 deletion test/api_stability/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0

cmake_minimum_required (VERSION 3.8)
cmake_minimum_required (VERSION 3.8...3.30)

project (api_stability)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/add_subdirectories.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

# Calls add_subdirectory on all (direct) subdirectories of the given directory if they contain a `CMakeLists.txt`
#
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/diagnostics/list_missing_unit_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

set (seqan3_test_include_targets
""
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/diagnostics/list_unused_snippets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

set (seqan3_test_snippets
""
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/diagnostics/list_unused_unit_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

set (seqan3_test_targets
""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

include (diagnostics/list_missing_unit_tests)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.12)
cmake_minimum_required (VERSION 3.12...3.30)

function (generate_include_dependencies_impl)
cmake_parse_arguments (
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_generate_snippet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

# Generate snippets from a source_snippet
#
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_macro_benchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

# Adds a macro benchmark target and a test which executes that macro benchmark
#
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_path_longest_stem.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

# A compatible function for cmake < 3.20 that basically returns `cmake_path (GET <filename> STEM LAST_ONLY <out_var>)`
function (seqan3_path_longest_stem out_var filename)
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_require_benchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.16)
cmake_minimum_required (VERSION 3.16...3.30)

# Exposes the google-benchmark target `benchmark` and `benchmark_main`.
# CMake 3.24: https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_require_ccache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.15)
cmake_minimum_required (VERSION 3.15...3.30)

# Uses `ccache` to cache build results.
#
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_require_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.16)
cmake_minimum_required (VERSION 3.16...3.30)

# Exposes the google-test targets `gtest` and `gtest_main`.
# CMake 3.24: https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_test_component.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

include (seqan3_path_longest_stem)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/seqan3_test_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

# Finds all files relative to the `test_base_path_` which satisfy the given file pattern.
#
Expand Down
2 changes: 1 addition & 1 deletion test/coverage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10...3.22)
cmake_minimum_required (VERSION 3.10...3.30)
project (seqan3_test_coverage CXX)

# Add a custom build type: Coverage
Expand Down
2 changes: 1 addition & 1 deletion test/documentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: BSD-3-Clause

# Minimum cmake version
cmake_minimum_required (VERSION 3.7)
cmake_minimum_required (VERSION 3.7...3.30)

### Find seqan3
include (../../build_system/seqan3-config-version.cmake)
Expand Down
2 changes: 1 addition & 1 deletion test/documentation/seqan3-doxygen-layout.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

include (${SEQAN3_INCLUDE_DIR}/../test/cmake/seqan3_test_files.cmake)

Expand Down
2 changes: 1 addition & 1 deletion test/documentation/seqan3-doxygen-package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

set (CPACK_GENERATOR "TXZ")

Expand Down
2 changes: 1 addition & 1 deletion test/documentation/seqan3-doxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

### Find doxygen and dependency to DOT tool
message (STATUS "Searching for doxygen.")
Expand Down
2 changes: 1 addition & 1 deletion test/external_project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.5)
cmake_minimum_required (VERSION 3.5...3.30)
project (seqan3_test_external_project CXX)

include (../seqan3-test.cmake) # for SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS, SEQAN3_VERSION
Expand Down
2 changes: 1 addition & 1 deletion test/external_project/install-seqan3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.14)
cmake_minimum_required (VERSION 3.14...3.30)

# install and package seqan3 library
ExternalProject_Add (
Expand Down
7 changes: 1 addition & 6 deletions test/external_project/install-sharg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.14)

# https://cmake.org/cmake/help/latest/policy/CMP0135.html
if (POLICY CMP0135)
cmake_policy (SET CMP0135 NEW)
endif ()
cmake_minimum_required (VERSION 3.14...3.30)

# We can only set one CMAKE_SYSTEM_PREFIX_PATH, i.e. it cannot be a list.
# Hence we need to reuse the SEQAN3_SYSTEM_PREFIX.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.14)
cmake_minimum_required (VERSION 3.14...3.30)
project (seqan3_app CXX)

# --- helper scripts
Expand Down
2 changes: 1 addition & 1 deletion test/external_project/seqan3_installed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.5)
cmake_minimum_required (VERSION 3.5...3.30)
project (seqan3_app CXX)

# --- helper scripts
Expand Down
2 changes: 1 addition & 1 deletion test/external_project/seqan3_setup_tutorial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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.5)
cmake_minimum_required (VERSION 3.5...3.30)
project (seqan3_tutorial CXX)

# add seqan3 to search path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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.5)
cmake_minimum_required (VERSION 3.5...3.30)
project (seqan3_tutorial CXX)

# add seqan3 to search path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.5)
cmake_minimum_required (VERSION 3.5...3.30)
project (seqan3_app CXX)

# --- helper scripts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.5)
cmake_minimum_required (VERSION 3.5...3.30)
project (seqan3_app CXX)

# --- helper scripts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.5)
cmake_minimum_required (VERSION 3.5...3.30)
project (seqan3_app CXX)

# --- helper scripts
Expand Down
2 changes: 1 addition & 1 deletion test/header/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.12...3.22)
cmake_minimum_required (VERSION 3.12...3.30)
project (seqan3_header_test CXX)

include (../seqan3-test.cmake)
Expand Down
2 changes: 1 addition & 1 deletion test/header/generate_header_source.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

option (HEADER_FILE_ABSOLUTE "")
option (HEADER_FILE_INCLUDE "")
Expand Down
2 changes: 1 addition & 1 deletion test/macro_benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10...3.22)
cmake_minimum_required (VERSION 3.10...3.30)
project (seqan3_test_unit CXX)

include (../seqan3-test.cmake)
Expand Down
2 changes: 1 addition & 1 deletion test/performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10...3.22)
cmake_minimum_required (VERSION 3.10...3.30)
project (seqan3_test_performance CXX)

include (../seqan3-test.cmake)
Expand Down
2 changes: 1 addition & 1 deletion test/seqan3-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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.10)
cmake_minimum_required (VERSION 3.10...3.30)

# require SeqAn3 package
find_package (SeqAn3 REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../build_system)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10...3.22)
cmake_minimum_required (VERSION 3.10...3.30)
project (seqan3_test_snippet CXX)

include (../seqan3-test.cmake)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/compare_snippet_output.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.10...3.30)

include ("${CMAKE_CURRENT_LIST_DIR}/../cmake/seqan3_path_longest_stem.cmake")

Expand Down
2 changes: 1 addition & 1 deletion test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.10...3.22)
cmake_minimum_required (VERSION 3.10...3.30)
project (seqan3_test_unit CXX)

include (../seqan3-test.cmake)
Expand Down

0 comments on commit 30bdf8d

Please sign in to comment.