diff --git a/cmake/lapack.cmake b/cmake/lapack.cmake index f8a27f5d4..3b221d420 100644 --- a/cmake/lapack.cmake +++ b/cmake/lapack.cmake @@ -999,6 +999,9 @@ endforeach () if (NOT C_LAPACK) set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS}") + if (${F_COMPILER} STREQUAL "GFORTRAN") + set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} -fno-tree-vectorize") + endif() else () set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS}") endif ()