ensure recent compiler
This commit is contained in:
parent
c5a0103246
commit
4f801259ca
|
@ -90,14 +90,21 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
||||||
include(Compiler-Intel)
|
|
||||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
|
||||||
include(Compiler-GNU)
|
include(Compiler-GNU)
|
||||||
|
set(Fortran_COMPILER_VERSION_MIN 9.1)
|
||||||
|
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
||||||
|
include(Compiler-Intel)
|
||||||
|
set(Fortran_COMPILER_VERSION_MIN 19)
|
||||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM")
|
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM")
|
||||||
include(Compiler-IntelLLVM)
|
include(Compiler-IntelLLVM)
|
||||||
|
set(Fortran_COMPILER_VERSION_MIN 19)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Compiler type(CMAKE_Fortran_COMPILER_ID) not recognized")
|
message(FATAL_ERROR "Compiler '${CMAKE_Fortran_COMPILER_ID}' not supported")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS Fortran_COMPILER_VERSION_MIN)
|
||||||
|
message(FATAL_ERROR "Version '${CMAKE_Fortran_COMPILER_VERSION}' of '${CMAKE_Fortran_COMPILER_ID}' is not supported")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(STRINGS "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/petsc/conf/petscvariables" PETSC_EXTERNAL_LIB REGEX "PETSC_EXTERNAL_LIB_BASIC = .*$?")
|
file(STRINGS "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/petsc/conf/petscvariables" PETSC_EXTERNAL_LIB REGEX "PETSC_EXTERNAL_LIB_BASIC = .*$?")
|
||||||
|
|
Loading…
Reference in New Issue