From f640947ed9563e6418bcd151f13783c741e1ac64 Mon Sep 17 00:00:00 2001 From: "Heldmann, Tim" Date: Wed, 23 Oct 2024 12:26:24 +0200 Subject: [PATCH] Fix CMake policy to work with older CMake Versions than 3.24 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1c2103..646e494 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 3.16) # Choose modern CMake behavior when extracting archives -cmake_policy(SET CMP0135 NEW) +if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) +endif() # Require out-of-source builds (taken from # https://hsf-training.github.io/hsf-training-cmake-webpage/07-commonproblems/index.html)