From c5c160a909ccbaca9fc79bd049c15ab003f46884 Mon Sep 17 00:00:00 2001 From: Ben Morgan <Ben.Morgan@warwick.ac.uk> Date: Thu, 11 Apr 2024 11:01:14 +0200 Subject: [PATCH] Use CMake version range to support LTO builds Use of CMake's LTO support requires version 3.9 or newer and the CMP0069 policy. As Geant4 10.6.3 only sets a minimum version of 3.8, LTO builds will never be enabled as the policy is never set. Bump version range to 3.8...3.27 to allow LTO builds when a suitable CMake version is used to build Geant4. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bac9695756..3a575a7aad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ endif() #----------------------------------------------------------------------- # - Define CMake requirements and override make rules as needed # -cmake_minimum_required(VERSION 3.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.8...3.27 FATAL_ERROR) # - Any policy requirements should go here -- GitLab