File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,31 @@ if (${F_COMPILER} STREQUAL "CRAY")
269
269
endif ()
270
270
endif ()
271
271
272
+ if (${F_COMPILER} STREQUAL "NAGFOR" )
273
+ set (CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_NAG" )
274
+ if (INTERFACE64 )
275
+ set (FCOMMON_OPT "${FCOMMON_OPT} -i8" )
276
+ endif ()
277
+ # Options from Makefile.system
278
+ # -dcfuns: Enable non-standard double precision complex intrinsic functions
279
+ # -ieee=full: enables all IEEE arithmetic facilities including non-stop arithmetic.
280
+ # -w=obs: Suppress warning messages about obsolescent features
281
+ # -thread_safe: Compile code for safe execution in a multi-threaded environment.
282
+ # -recursive: Specifies that procedures are RECURSIVE by default.
283
+ set (FCOMMON_OPT "${FCOMMON_OPT} -dcfuns -recursive -ieee=full -w=obs -thread_safe" )
284
+ # Options from Reference-LAPACK
285
+ # Suppress compiler banner and summary
286
+ set (FCOMMON_OPT "${FCOMMON_OPT} -quiet" )
287
+ # Disable other common warnings
288
+ # -w=x77: Suppress warning messages about Fortran 77 features
289
+ # -w=ques: Suppress warning messages about questionable usage
290
+ # -w=unused: Suppress warning messages about unused variables
291
+ set (FCOMMON_OPT "${FCOMMON_OPT} -w=x77 -w=ques -w=unused" )
292
+ if (USE_OPENMP )
293
+ set (FCOMMON_OPT "${FCOMMON_OPT} -openmp" )
294
+ endif ()
295
+ endif ()
296
+
272
297
# from the root Makefile - this is for lapack-netlib to compile the correct secnd file.
273
298
if (${F_COMPILER} STREQUAL "GFORTRAN" )
274
299
set (TIMER "INT_ETIME" )
Original file line number Diff line number Diff line change @@ -1018,7 +1018,12 @@ foreach (LA_FILE ${LA_GEN_SRC})
1018
1018
endforeach ()
1019
1019
1020
1020
if (NOT C_LAPACK )
1021
- set_source_files_properties (${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} " )
1021
+ # The below line is duplicating Fortran flags but NAG has a few flags
1022
+ # that cannot be specified twice. It's possible this is not needed for
1023
+ # any compiler, but for safety, we only turn off for NAG
1024
+ if (NOT ${F_COMPILER} STREQUAL "NAGFOR" )
1025
+ set_source_files_properties (${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} " )
1026
+ endif ()
1022
1027
if (${F_COMPILER} STREQUAL "GFORTRAN" )
1023
1028
set_source_files_properties (${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} -fno-tree-vectorize" )
1024
1029
endif ()
Original file line number Diff line number Diff line change @@ -642,7 +642,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
642
642
endif ()
643
643
644
644
if (CMAKE_Fortran_COMPILER )
645
- if ("${F_COMPILER} " STREQUAL "NAG " OR "${F_COMPILER} " STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" )
645
+ if ("${F_COMPILER} " STREQUAL "NAGFOR " OR "${F_COMPILER} " STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" )
646
646
set (FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512" )
647
647
if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" )
648
648
message (STATUS "removing fortran flags" )
You can’t perform that action at this time.
0 commit comments