From eef701fb415b427bdeaad0777c24fbe97d022c07 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 19 Nov 2024 15:04:20 +0100
Subject: [PATCH] Projects: set cmake 3.25 as minimum version

In preparation for upcoming changes in the externals (ATLINFR-5446),
set the minimum required cmake version to 3.25.

Also fixes warnings about deprecated cmake versions in
cmake 3.31 (ATLINFR-5585).
---
 Calorimeter/CaloRecGPU/CMakeLists.txt | 4 ----
 Generators/Epos_i/CMakeLists.txt      | 3 ---
 Projects/AnalysisBase/CMakeLists.txt  | 2 +-
 Projects/AthAnalysis/CMakeLists.txt   | 2 +-
 Projects/AthGeneration/CMakeLists.txt | 2 +-
 Projects/AthSimulation/CMakeLists.txt | 2 +-
 Projects/Athena/CMakeLists.txt        | 2 +-
 Projects/DetCommon/CMakeLists.txt     | 2 +-
 Projects/VP1Light/CMakeLists.txt      | 2 +-
 Projects/WorkDir/CMakeLists.txt       | 2 +-
 10 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/Calorimeter/CaloRecGPU/CMakeLists.txt b/Calorimeter/CaloRecGPU/CMakeLists.txt
index 685181e770a..062996ae4c1 100644
--- a/Calorimeter/CaloRecGPU/CMakeLists.txt
+++ b/Calorimeter/CaloRecGPU/CMakeLists.txt
@@ -1,9 +1,5 @@
 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 
-
-# This package needs CUDA to be handled as a "first class language" by CMake.
-cmake_minimum_required(VERSION 3.11)
-
 # Set the name of the package.
 atlas_subdir( CaloRecGPU )
 
diff --git a/Generators/Epos_i/CMakeLists.txt b/Generators/Epos_i/CMakeLists.txt
index f18cf600e86..465cf964194 100644
--- a/Generators/Epos_i/CMakeLists.txt
+++ b/Generators/Epos_i/CMakeLists.txt
@@ -1,8 +1,5 @@
 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-# Minimum CMake requirement for the package.
-cmake_minimum_required( VERSION 3.21 )
-
 # Declare the package name:
 atlas_subdir( Epos_i )
 
diff --git a/Projects/AnalysisBase/CMakeLists.txt b/Projects/AnalysisBase/CMakeLists.txt
index 27da404a40d..49691e76aca 100644
--- a/Projects/AnalysisBase/CMakeLists.txt
+++ b/Projects/AnalysisBase/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.6 )
+cmake_minimum_required( VERSION 3.25 )
 file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
 string( STRIP ${_version} _version )
 project( AnalysisBase VERSION ${_version} LANGUAGES C CXX )
diff --git a/Projects/AthAnalysis/CMakeLists.txt b/Projects/AthAnalysis/CMakeLists.txt
index a691873d021..5eb959a7f76 100644
--- a/Projects/AthAnalysis/CMakeLists.txt
+++ b/Projects/AthAnalysis/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.6 )
+cmake_minimum_required( VERSION 3.25 )
 file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
 string( STRIP ${_version} _version )
 project( AthAnalysis VERSION ${_version} LANGUAGES C CXX Fortran )
diff --git a/Projects/AthGeneration/CMakeLists.txt b/Projects/AthGeneration/CMakeLists.txt
index 44f681c3c27..fb60f0e47ea 100644
--- a/Projects/AthGeneration/CMakeLists.txt
+++ b/Projects/AthGeneration/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.6 )
+cmake_minimum_required( VERSION 3.25 )
 file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
 string( STRIP ${_version} _version )
 project( AthGeneration VERSION ${_version} LANGUAGES C CXX Fortran )
diff --git a/Projects/AthSimulation/CMakeLists.txt b/Projects/AthSimulation/CMakeLists.txt
index 73430237927..3381ce88eae 100644
--- a/Projects/AthSimulation/CMakeLists.txt
+++ b/Projects/AthSimulation/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.10 )
+cmake_minimum_required( VERSION 3.25 )
 file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
 string( STRIP ${_version} _version )
 project( AthSimulation VERSION ${_version} LANGUAGES C CXX Fortran )
diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt
index 22fc57b6bb4..8a3c95b3b0c 100644
--- a/Projects/Athena/CMakeLists.txt
+++ b/Projects/Athena/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.10 )
+cmake_minimum_required( VERSION 3.25 )
 file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
 string( STRIP ${_version} _version )
 project( Athena VERSION ${_version} LANGUAGES C CXX Fortran )
diff --git a/Projects/DetCommon/CMakeLists.txt b/Projects/DetCommon/CMakeLists.txt
index 7032d270586..faeee8c33ee 100644
--- a/Projects/DetCommon/CMakeLists.txt
+++ b/Projects/DetCommon/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.10 )
+cmake_minimum_required( VERSION 3.25 )
 file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
 string( STRIP ${_version} _version )
 project( DetCommon VERSION ${_version} LANGUAGES C CXX )
diff --git a/Projects/VP1Light/CMakeLists.txt b/Projects/VP1Light/CMakeLists.txt
index e4afa182f05..12c367383c8 100644
--- a/Projects/VP1Light/CMakeLists.txt
+++ b/Projects/VP1Light/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.6 )
+cmake_minimum_required( VERSION 3.25 )
 file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
 string( STRIP ${_version} _version )
 project( VP1Light VERSION ${_version} LANGUAGES C CXX )
diff --git a/Projects/WorkDir/CMakeLists.txt b/Projects/WorkDir/CMakeLists.txt
index b5f8256a281..e4e4cf5add6 100644
--- a/Projects/WorkDir/CMakeLists.txt
+++ b/Projects/WorkDir/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 
 # Set up the project.
-cmake_minimum_required( VERSION 3.10 )
+cmake_minimum_required( VERSION 3.25 )
 # Note that there is a second `project` call further below to set
 # the version and languages.
 project( WorkDir )
-- 
GitLab