diff --git a/ctest/CMakeLists.txt b/ctest/CMakeLists.txt index 17f29fe69..f785d3f90 100644 --- a/ctest/CMakeLists.txt +++ b/ctest/CMakeLists.txt @@ -4,6 +4,9 @@ include_directories(${PROJECT_BINARY_DIR}) enable_language(Fortran) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS") +if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize") +endif() if(WIN32) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.ps1 diff --git a/ctest/Makefile b/ctest/Makefile index 15c83a907..c5e1094da 100644 --- a/ctest/Makefile +++ b/ctest/Makefile @@ -6,6 +6,9 @@ TOPDIR = .. include $(TOPDIR)/Makefile.system override CFLAGS += -DADD$(BU) -DCBLAS +ifeq ($(F_COMPILER),GFORTRAN) + override FFLAGS += -fno-tree-vectorize +endif override TARGET_ARCH= override TARGET_MACH= diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d338242ff..e4ee8b28b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,6 +2,10 @@ include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_BINARY_DIR}) enable_language(Fortran) +if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize") +endif() + if (BUILD_SINGLE) list( APPEND OpenBLAS_Tests sblat1 sblat2 sblat3) diff --git a/test/Makefile b/test/Makefile index 6c5f041c2..923f1537c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,8 @@ TOPDIR = .. include ../Makefile.system - +ifeq ($(F_COMPILER),GFORTRAN) + override FFLAGS += -fno-tree-vectorize +endif ifeq ($(NOFORTRAN),1) all ::