Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDimitrij Mijoski2022-09-16 17:56:00 +0200
committerGitHub2022-09-16 17:56:00 +0200
commit98d37da03ee21e8a87cd3e0e6542c794c667e78b (patch)
treec5acd00bde95febb23e76038db083011f54cdf85
parent4b3defe4afe32dbf4c8feaf49b97907129e05834 (diff)
downloadcatch3-98d37da03ee21e8a87cd3e0e6542c794c667e78b.tar.gz
Raise the minimum CMake version to 3.10 (#2523)
-rw-r--r--CMakeLists.txt28
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--tests/ExtraTests/CMakeLists.txt2
3 files changed, 12 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae8e86b9..be12d516 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.10)
# detect if Catch is being bundled,
# disable testsuite in that case
@@ -30,23 +30,15 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
endif()
-if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.9)
- # Enable IPO for CMake versions that support it
- cmake_policy(SET CMP0069 NEW)
- project(Catch2
- VERSION 3.1.0 # CML version placeholder, don't delete
- LANGUAGES CXX
- # HOMEPAGE_URL is not supported until CMake version 3.12, which
- # we do not target yet.
- # HOMEPAGE_URL "https://github.com/catchorg/Catch2"
- DESCRIPTION "A modern, C++-native, unit test framework."
- )
-else()
- project(Catch2
- VERSION 3.1.0 # CML version placeholder, don't delete
- LANGUAGES CXX
- )
-endif()
+project(Catch2
+ VERSION 3.1.0 # CML version placeholder, don't delete
+ LANGUAGES CXX
+ # HOMEPAGE_URL is not supported until CMake version 3.12, which
+ # we do not target yet.
+ # HOMEPAGE_URL "https://github.com/catchorg/Catch2"
+ DESCRIPTION "A modern, C++-native, unit test framework."
+)
+
# Provide path for scripts. We first add path to the scripts we don't use,
# but projects including us might, and set the path up to parent scope.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index b934aa7c..7118482e 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required( VERSION 3.5 )
+cmake_minimum_required( VERSION 3.10 )
project( Catch2Examples LANGUAGES CXX )
diff --git a/tests/ExtraTests/CMakeLists.txt b/tests/ExtraTests/CMakeLists.txt
index f1a02af3..0943a9c3 100644
--- a/tests/ExtraTests/CMakeLists.txt
+++ b/tests/ExtraTests/CMakeLists.txt
@@ -2,7 +2,7 @@
# Build extra tests.
#
-cmake_minimum_required( VERSION 3.5 )
+cmake_minimum_required( VERSION 3.10 )
project( Catch2ExtraTests LANGUAGES CXX )