From 2411a7ef12202b808e1ceaba03e0ca3f939fc603 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 16 Jul 2024 20:35:05 +0200 Subject: [PATCH] build: minimum required CMake version bumped to 3.25 Resolves #597 --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- src/cmake/AddMPUnitsModule.cmake | 2 ++ src/cmake/CheckCXXFeatureSupported.cmake | 2 ++ src/cmake/CheckLibcxxInUse.cmake | 2 +- src/cmake/MPUnitsContracts.cmake | 2 ++ test_package/CMakeLists.txt | 2 +- 7 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2523ab498..0f4fb2e2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.23) +cmake_minimum_required(VERSION 3.25) project(mp-units-dev LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f2080530e..4e933d6eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.23) +cmake_minimum_required(VERSION 3.25) project(mp-units VERSION 2.3.0 LANGUAGES CXX) set(projectPrefix MP_UNITS_) diff --git a/src/cmake/AddMPUnitsModule.cmake b/src/cmake/AddMPUnitsModule.cmake index 87457db21..6be0e2786 100644 --- a/src/cmake/AddMPUnitsModule.cmake +++ b/src/cmake/AddMPUnitsModule.cmake @@ -20,6 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +cmake_minimum_required(VERSION 3.25) + include_guard(GLOBAL) function(validate_unparsed module prefix) diff --git a/src/cmake/CheckCXXFeatureSupported.cmake b/src/cmake/CheckCXXFeatureSupported.cmake index 337f40a6f..011452c8f 100644 --- a/src/cmake/CheckCXXFeatureSupported.cmake +++ b/src/cmake/CheckCXXFeatureSupported.cmake @@ -59,6 +59,8 @@ For example: check_cxx_feature_supported("__cpp_constexpr >= 202211L" STATIC_CONSTEXPR_VARS_IN_CONSTEXPR_FUNCTIONS) #]=======================================================================] +cmake_minimum_required(VERSION 3.25) + include_guard(GLOBAL) macro(CHECK_CXX_FEATURE_SUPPORTED CONDITION VARIABLE) diff --git a/src/cmake/CheckLibcxxInUse.cmake b/src/cmake/CheckLibcxxInUse.cmake index 7335da5c0..6f14aeb79 100644 --- a/src/cmake/CheckLibcxxInUse.cmake +++ b/src/cmake/CheckLibcxxInUse.cmake @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.25) function(check_libcxx_in_use variable) if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/cmake/MPUnitsContracts.cmake b/src/cmake/MPUnitsContracts.cmake index 6b45c24ef..96907a170 100644 --- a/src/cmake/MPUnitsContracts.cmake +++ b/src/cmake/MPUnitsContracts.cmake @@ -20,6 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +cmake_minimum_required(VERSION 3.25) + add_library(mp-units-contracts INTERFACE) if(${projectPrefix}API_CONTRACTS STREQUAL "NONE") diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index a9d51d8b1..8e11064e6 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.23) +cmake_minimum_required(VERSION 3.25) project(test_package LANGUAGES CXX) find_package(mp-units REQUIRED)