Disable flang (over-)optimizations in BLAS tests (#3600)
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Sat, 9 Apr 2022 15:14:24 +0000 (17:14 +0200)
committerGitHub <noreply@github.com>
Sat, 9 Apr 2022 15:14:24 +0000 (17:14 +0200)
* limit flang optimizations to -O2

test/CMakeLists.txt

index 786fdd7..57ea805 100644 (file)
@@ -5,7 +5,9 @@ enable_language(Fortran)
 if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
         set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize")
 endif()
-
+if (CMAKE_Fortran_COMPILER_ID STREQUAL Flang)
+       set(CMAKE_Fortran_FLAGS "$CMAKE_Fortran_FLAGS -O2")
+endif()
 
 if (BUILD_SINGLE)
        list( APPEND OpenBLAS_Tests sblat1 sblat2 sblat3)