From 379afe2cfc6e0a29d2726b346e364bdf2854dfc9 Mon Sep 17 00:00:00 2001 From: Thomas Gastine Date: Mon, 27 May 2024 12:07:33 +0200 Subject: [PATCH] raise minimum Cmake version to 3.5 to remove warnings --- CMakeLists.txt | 3 +-- cmake/FindSSE.cmake | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b16536c..ec2e625d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ -cmake_minimum_required (VERSION 3.0) +cmake_minimum_required (VERSION 3.5) project (magic) enable_language (Fortran C) -cmake_policy(SET CMP0054 NEW) # generate a Git version string execute_process(COMMAND git describe --abbrev=7 --always --tags OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/cmake/FindSSE.cmake b/cmake/FindSSE.cmake index c152dd74..a385e2d4 100644 --- a/cmake/FindSSE.cmake +++ b/cmake/FindSSE.cmake @@ -2,7 +2,7 @@ # the project is compiled. IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) + execute_process(COMMAND cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) STRING(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE ${CPUINFO}) STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE) @@ -58,7 +58,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux") ENDIF (AVX2_TRUE) ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin") - EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE + execute_process(COMMAND "/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE CPUINFO) STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO})