diff --git a/cmake/system.cmake b/cmake/system.cmake index 1a054f6db2..c26b415c6d 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -616,9 +616,11 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") endforeach () endif () +if (CMAKE_Fortran_COMPILER) if (${F_COMPILER} STREQUAL "NAG" OR ${F_COMPILER} STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*") set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512") if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*") +message(STATUS "removing fortran flags") set(FILTER_FLAGS "${FILTER_FLAGS};-m32;-m64") endif () foreach (FILTER_FLAG ${FILTER_FLAGS}) @@ -626,6 +628,7 @@ if (${F_COMPILER} STREQUAL "NAG" OR ${F_COMPILER} STREQUAL "CRAY" OR CMAKE_Fortr string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS}) endforeach () endif () +endif () if ("${F_COMPILER}" STREQUAL "GFORTRAN") # lapack-netlib is rife with uninitialized warnings -hpa