From 4dba6ce6ea549b226ed3a4e481165370abd1b4dc Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 20 Oct 2024 20:25:06 +0200 Subject: [PATCH] work around mingw32-gfortran 14.2 miscompiling CBLAS1 tests --- ctest/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ctest/CMakeLists.txt b/ctest/CMakeLists.txt index c56a78346..4496eff82 100644 --- a/ctest/CMakeLists.txt +++ b/ctest/CMakeLists.txt @@ -6,6 +6,10 @@ enable_language(Fortran) endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS") +if (BINARY32 AND CMAKE_C_PLATFORM_ID MATCHES "MinGW" AND CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL 14.2) + list(REMOVE_ITEM ${CMAKE_Fortran_FLAGS} -O3 -O2 -O1 -Os) + set (CMAKE_Fortran_FLAGS_RELEASE "" CACHE STRING "" FORCE) +endif() if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize") endif()