From edfe83d8dd7022167391d8cd7e1556807fa547b4 Mon Sep 17 00:00:00 2001 From: Ahmad Nawab Date: Mon, 11 Sep 2023 10:08:11 +0200 Subject: [PATCH] Reduce minimum CMake version to 3.24 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b2b540..4168fa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ # granted to it by virtue of its status as an intergovernmental organisation # nor does it submit to any jurisdiction. -cmake_minimum_required (VERSION 3.25) +cmake_minimum_required (VERSION 3.24) ## find ecbuild find_package( ecbuild 3.7 QUIET HINTS ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild ) @@ -37,7 +37,11 @@ if( NOT FYPP) endif() ## find OpenACC +### Workaround for CMake bug (fixed in CMake 3.25) find_package(OpenACC COMPONENTS Fortran) +if( OpenACC_Fortran_FOUND ) + set( OpenACC_FOUND ON ) +endif() ecbuild_add_option( FEATURE ACC DESCRIPTION "OpenACC" DEFAULT ON CONDITION OpenACC_FOUND )