From 51bccd98d535b4d706c72f6b59e75ca6ea584780 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 20 Dec 2023 11:27:57 +0100 Subject: [PATCH 1/2] check is already done centrally --- cmake/Compiler-GNU.cmake | 4 ---- cmake/Compiler-Intel.cmake | 4 ---- cmake/Compiler-IntelLLVM.cmake | 6 +----- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/cmake/Compiler-GNU.cmake b/cmake/Compiler-GNU.cmake index a62875d05..ee58f8cc7 100644 --- a/cmake/Compiler-GNU.cmake +++ b/cmake/Compiler-GNU.cmake @@ -1,10 +1,6 @@ ################################################################################################### # GNU Compiler ################################################################################################### -if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0) - message (FATAL_ERROR "GCC Compiler version: ${CMAKE_Fortran_COMPILER_VERSION} not supported") -endif () - if (OPENMP) set (OPENMP_FLAGS "-fopenmp") endif () diff --git a/cmake/Compiler-Intel.cmake b/cmake/Compiler-Intel.cmake index 19e75a9fa..2182459ed 100644 --- a/cmake/Compiler-Intel.cmake +++ b/cmake/Compiler-Intel.cmake @@ -1,10 +1,6 @@ ################################################################################################### # Intel Compiler ################################################################################################### -if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0) - message (FATAL_ERROR "Intel Compiler version: ${CMAKE_Fortran_COMPILER_VERSION} not supported") -endif () - if (OPENMP) set (OPENMP_FLAGS "-qopenmp -parallel") endif () diff --git a/cmake/Compiler-IntelLLVM.cmake b/cmake/Compiler-IntelLLVM.cmake index 76fc0386a..4cdd2588d 100644 --- a/cmake/Compiler-IntelLLVM.cmake +++ b/cmake/Compiler-IntelLLVM.cmake @@ -1,10 +1,6 @@ ################################################################################################### -# Intel Compiler +# IntelLLVM Compiler ################################################################################################### -if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0) - message (FATAL_ERROR "Intel Compiler version: ${CMAKE_Fortran_COMPILER_VERSION} not supported") -endif () - if (OPENMP) set (OPENMP_FLAGS "-fiopenmp") endif () From bdb30118fb2aa6757a42dcd4648cd56b013dc1e9 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 20 Dec 2023 17:39:28 +0100 Subject: [PATCH 2/2] starting to support new LLVM compiler does not work yet, but good to have for testing once in a while. Current version is 17, require minimum 19 to make clear that it does not work --- CMakeLists.txt | 3 +++ cmake/Compiler-LLVMFlang.cmake | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 cmake/Compiler-LLVMFlang.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index a501717ed..b630f7e46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,9 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") include(Compiler-IntelLLVM) set(Fortran_COMPILER_VERSION_MIN 19) +elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang") + include(Compiler-LLVMFlang) + set(Fortran_COMPILER_VERSION_MIN 19) else() message(FATAL_ERROR "Compiler '${CMAKE_Fortran_COMPILER_ID}' not supported") endif() diff --git a/cmake/Compiler-LLVMFlang.cmake b/cmake/Compiler-LLVMFlang.cmake new file mode 100644 index 000000000..c6b0405bc --- /dev/null +++ b/cmake/Compiler-LLVMFlang.cmake @@ -0,0 +1,12 @@ +################################################################################################### +# LLVM Compiler +################################################################################################### +if (OPENMP) + set (OPENMP_FLAGS "-fopenmp") +endif () + +#------------------------------------------------------------------------------------------------ +# Fine tuning compilation options +set (COMPILE_FLAGS "${COMPILE_FLAGS} -cpp") +# preprocessor +