Skip to content

Commit e381031

Browse files
committed
[INFRA] Bump CMake
CPP23 detection needs 3.20, 3.10 and older will also be deprecated
1 parent 01853bd commit e381031

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+82
-126
lines changed

CMakeLists.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,18 @@
66
# SeqAn3. To build tests, run cmake on one of the sub-folders in this directory
77
# which contain a CMakeLists.txt.
88

9-
cmake_minimum_required (VERSION 3.5...3.30)
9+
cmake_minimum_required (VERSION 3.20...3.31)
1010

1111
find_path (SEQAN3_MODULE_PATH "seqan3-config.cmake" HINTS "${CMAKE_CURRENT_LIST_DIR}/cmake/")
1212
list (APPEND CMAKE_MODULE_PATH "${SEQAN3_MODULE_PATH}")
1313

1414
include (seqan3-config-version)
1515

16-
if (CMAKE_VERSION VERSION_LESS 3.12)
17-
project (seqan3
18-
LANGUAGES CXX
19-
VERSION "${SEQAN3_PROJECT_VERSION}")
20-
else ()
21-
project (seqan3
22-
LANGUAGES CXX
23-
VERSION "${SEQAN3_PROJECT_VERSION}"
24-
DESCRIPTION "SeqAn3 -- the modern C++ library for sequence analysis" # since cmake 3.9
25-
HOMEPAGE_URL "https://github.com/seqan/seqan3" # since cmake 3.12
26-
)
27-
endif ()
16+
project (seqan3
17+
LANGUAGES CXX
18+
VERSION "${SEQAN3_PROJECT_VERSION}"
19+
DESCRIPTION "SeqAn3 -- the modern C++ library for sequence analysis"
20+
HOMEPAGE_URL "https://github.com/seqan/seqan3")
2821

2922
find_package (SeqAn3 3.0 REQUIRED HINTS ${SEQAN3_MODULE_PATH})
3023

cmake/seqan3-config.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#
6060
# ============================================================================
6161

62-
cmake_minimum_required (VERSION 3.5...3.30)
62+
cmake_minimum_required (VERSION 3.20...3.31)
6363

6464
# ----------------------------------------------------------------------------
6565
# Set initial variables
@@ -350,7 +350,8 @@ set (CXXSTD_TEST_SOURCE "#include <seqan3/core/platform.hpp>
350350
# using try_compile instead of check_cxx_source_compiles to capture output in case of failure
351351
file (WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" "${CXXSTD_TEST_SOURCE}\n")
352352

353-
try_compile (SEQAN3_PLATFORM_TEST #
353+
# cmake-format: off
354+
try_compile (SEQAN3_PLATFORM_TEST
354355
${CMAKE_BINARY_DIR}
355356
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
356357
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_INCLUDE_PATH};${SEQAN3_INCLUDE_DIR};${SEQAN3_DEPENDENCY_INCLUDE_DIRS}"
@@ -360,6 +361,7 @@ try_compile (SEQAN3_PLATFORM_TEST #
360361
CXX_STANDARD_REQUIRED ON
361362
CXX_EXTENSIONS OFF
362363
OUTPUT_VARIABLE SEQAN3_PLATFORM_TEST_OUTPUT)
364+
# cmake-format: on
363365

364366
if (SEQAN3_PLATFORM_TEST)
365367
seqan3_config_print ("SeqAn3 platform.hpp build: passed.")
@@ -401,7 +403,7 @@ set (SEQAN3_INCLUDE_DIRS ${SEQAN3_INCLUDE_DIR} ${SEQAN3_DEPENDENCY_INCLUDE_DIRS}
401403
if (SEQAN3_FOUND AND NOT TARGET seqan3::seqan3)
402404
add_library (seqan3_seqan3 INTERFACE)
403405
target_compile_definitions (seqan3_seqan3 INTERFACE ${SEQAN3_DEFINITIONS})
404-
target_compile_features(seqan3_seqan3 INTERFACE cxx_std_23)
406+
target_compile_features (seqan3_seqan3 INTERFACE cxx_std_23)
405407
target_link_libraries (seqan3_seqan3 INTERFACE "${SEQAN3_LIBRARIES}")
406408
# include seqan3/include/ as -I, because seqan3 should never produce warnings.
407409
target_include_directories (seqan3_seqan3 INTERFACE "${SEQAN3_INCLUDE_DIR}")

cmake/seqan3-install.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

7-
cmake_minimum_required (VERSION 3.14...3.30)
7+
cmake_minimum_required (VERSION 3.20...3.31)
88

99
include (GNUInstallDirs)
1010

cmake/seqan3-package.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# This file describes how SeqAn3 will be packaged.
66

7-
cmake_minimum_required (VERSION 3.7...3.30)
7+
cmake_minimum_required (VERSION 3.20...3.31)
88

99
set (CPACK_GENERATOR "TXZ")
1010

doc/setup/quickstart_cmake/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ For example, after adding `another_program.cpp` your `CMakeLists.txt` may look l
188188
# Including SeqAn3 as external project
189189

190190
```cmake
191-
cmake_minimum_required (VERSION 3.14...3.30)
191+
cmake_minimum_required (VERSION 3.20...3.31)
192192
193193
project (my_app LANGUAGES CXX VERSION 1.0.0)
194194

test/analyse/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
33
# SPDX-License-Identifier: BSD-3-Clause
44

5-
cmake_minimum_required (VERSION 3.10...3.30)
5+
cmake_minimum_required (VERSION 3.20...3.31)
66
project (seqan3_test_analyze CXX)
77

88
include (../seqan3-test.cmake)

test/api_stability/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
33
# SPDX-License-Identifier: CC0-1.0
44

5-
cmake_minimum_required (VERSION 3.8...3.30)
5+
cmake_minimum_required (VERSION 3.20...3.31)
66

77
project (api_stability)
88

test/cmake/add_subdirectories.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
33
# SPDX-License-Identifier: BSD-3-Clause
44

5-
cmake_minimum_required (VERSION 3.10...3.30)
5+
cmake_minimum_required (VERSION 3.20...3.31)
66

77
# Calls add_subdirectory on all (direct) subdirectories of the given directory if they contain a `CMakeLists.txt`
88
#

test/cmake/diagnostics/list_missing_unit_tests.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
33
# SPDX-License-Identifier: BSD-3-Clause
44

5-
cmake_minimum_required (VERSION 3.10...3.30)
5+
cmake_minimum_required (VERSION 3.20...3.31)
66

77
set (seqan3_test_include_targets
88
""

test/cmake/diagnostics/list_unused_snippets.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
33
# SPDX-License-Identifier: BSD-3-Clause
44

5-
cmake_minimum_required (VERSION 3.10...3.30)
5+
cmake_minimum_required (VERSION 3.20...3.31)
66

77
set (seqan3_test_snippets
88
""

0 commit comments

Comments
 (0)