| @@ -269,6 +269,31 @@ if (${F_COMPILER} STREQUAL "CRAY") | |||||
| endif () | endif () | ||||
| endif () | endif () | ||||
| if (${F_COMPILER} STREQUAL "NAGFOR") | |||||
| set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_NAG") | |||||
| if (INTERFACE64) | |||||
| set(FCOMMON_OPT "${FCOMMON_OPT} -i8") | |||||
| endif () | |||||
| # Options from Makefile.system | |||||
| # -dcfuns: Enable non-standard double precision complex intrinsic functions | |||||
| # -ieee=full: enables all IEEE arithmetic facilities including non-stop arithmetic. | |||||
| # -w=obs: Suppress warning messages about obsolescent features | |||||
| # -thread_safe: Compile code for safe execution in a multi-threaded environment. | |||||
| # -recursive: Specifies that procedures are RECURSIVE by default. | |||||
| set(FCOMMON_OPT "${FCOMMON_OPT} -dcfuns -recursive -ieee=full -w=obs -thread_safe") | |||||
| # Options from Reference-LAPACK | |||||
| # Suppress compiler banner and summary | |||||
| set(FCOMMON_OPT "${FCOMMON_OPT} -quiet") | |||||
| # Disable other common warnings | |||||
| # -w=x77: Suppress warning messages about Fortran 77 features | |||||
| # -w=ques: Suppress warning messages about questionable usage | |||||
| # -w=unused: Suppress warning messages about unused variables | |||||
| set(FCOMMON_OPT "${FCOMMON_OPT} -w=x77 -w=ques -w=unused") | |||||
| if (USE_OPENMP) | |||||
| set(FCOMMON_OPT "${FCOMMON_OPT} -openmp") | |||||
| endif () | |||||
| endif () | |||||
| # from the root Makefile - this is for lapack-netlib to compile the correct secnd file. | # from the root Makefile - this is for lapack-netlib to compile the correct secnd file. | ||||
| if (${F_COMPILER} STREQUAL "GFORTRAN") | if (${F_COMPILER} STREQUAL "GFORTRAN") | ||||
| set(TIMER "INT_ETIME") | set(TIMER "INT_ETIME") | ||||
| @@ -1018,7 +1018,12 @@ foreach (LA_FILE ${LA_GEN_SRC}) | |||||
| endforeach () | endforeach () | ||||
| if (NOT C_LAPACK) | if (NOT C_LAPACK) | ||||
| set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS}") | |||||
| # The below line is duplicating Fortran flags but NAG has a few flags | |||||
| # that cannot be specified twice. It's possible this is not needed for | |||||
| # any compiler, but for safety, we only turn off for NAG | |||||
| if (NOT ${F_COMPILER} STREQUAL "NAGFOR") | |||||
| set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS}") | |||||
| endif () | |||||
| if (${F_COMPILER} STREQUAL "GFORTRAN") | if (${F_COMPILER} STREQUAL "GFORTRAN") | ||||
| set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} -fno-tree-vectorize") | set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} -fno-tree-vectorize") | ||||
| endif() | endif() | ||||
| @@ -642,7 +642,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |||||
| endif () | endif () | ||||
| if (CMAKE_Fortran_COMPILER) | if (CMAKE_Fortran_COMPILER) | ||||
| if ("${F_COMPILER}" STREQUAL "NAG" OR "${F_COMPILER}" STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*") | |||||
| if ("${F_COMPILER}" STREQUAL "NAGFOR" OR "${F_COMPILER}" STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*") | |||||
| set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512") | set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512") | ||||
| if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*") | if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*") | ||||
| message(STATUS "removing fortran flags") | message(STATUS "removing fortran flags") | ||||