Check for gfortran version < 4.6 in CMakeLists.txt

This commit is contained in:
Paul Romano 2015-05-13 15:41:48 +07:00
parent 60fd9b88dc
commit 22e4dd3aec

View file

@ -56,6 +56,13 @@ endif()
#===============================================================================
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
# Make sure version is sufficient
execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_LESS 4.6)
message(FATAL_ERROR "gfortran version must be 4.6 or higher")
endif()
# GNU Fortran compiler options
set(f90flags "-cpp -std=f2008 -fbacktrace")
if(debug)