This commit is contained in:
Markus Mützel 2023-10-13 20:33:28 +02:00 committed by GitHub
commit 0aa7589439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 13 deletions

View File

@ -167,9 +167,6 @@ jobs:
idx: int32
target-prefix: mingw-w64-clang-x86_64
fc-pkg: fc
# Compiling with Flang 16 seems to cause test errors on machines
# with AVX512 instructions. Revisit after MSYS2 distributes Flang 17.
no-avx512-flags: -DNO_AVX512=1
- msystem: CLANG32
idx: int32
target-prefix: mingw-w64-clang-i686
@ -185,9 +182,6 @@ jobs:
idx64-flags: -DBINARY=64 -DINTERFACE64=1
target-prefix: mingw-w64-clang-x86_64
fc-pkg: fc
# Compiling with Flang 16 seems to cause test errors on machines
# with AVX512 instructions. Revisit after MSYS2 distributes Flang 17.
no-avx512-flags: -DNO_AVX512=1
- msystem: MINGW64
idx: int32
target-prefix: mingw-w64-x86_64
@ -274,7 +268,6 @@ jobs:
-DTARGET=CORE2 \
${{ matrix.idx64-flags }} \
${{ matrix.c-lapack-flags }} \
${{ matrix.no-avx512-flags }} \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
..

View File

@ -93,6 +93,38 @@ endif()
message(WARNING "CMake support is experimental. It does not yet support all build options and may not produce the same Makefiles that OpenBLAS ships with.")
if(NOT NOFORTRAN)
# Check for working Fortran compiler
include(CheckLanguage)
check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
enable_language(Fortran)
else()
set(NOFORTRAN 1)
endif()
endif()
if (NOT NOFORTRAN AND CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 17 OR WIN32)
# The *blas3 tests fail on hardware with AVX512 instruction when using
# LLVM Flang before version 17 or when using LLVM Flang on Windows.
# Tested with LLVM Flang 16 and LLVM Flang 17 on Windows (MSYS2/CLANG64).
# FIXME: Revisit with LLVM Flang 18.
if (NOT NO_AVX512)
message(STATUS "Disabling AVX512 instructions for LLVM Flang before version 17 or on Windows.")
endif()
set(NO_AVX512 1)
endif()
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 17)
# LLVM Flang before version 17 doesn't support necessary OpenMP constructs.
if (USE_OPENMP)
message(STATUS "Disabling OpenMP for LLVM Flang before version 17.")
set(USE_OPENMP 0)
endif()
endif()
endif()
include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")

View File

@ -20,12 +20,7 @@
# NEEDBUNDERSCORE
# NEED2UNDERSCORES
include(CheckLanguage)
check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
enable_language(Fortran)
else()
set (NOFORTRAN 1)
if(NOT CMAKE_Fortran_COMPILER)
if (NOT NO_LAPACK)
if (NOT XXXXX)
message(STATUS "No Fortran compiler found, can build only BLAS and f2c-converted LAPACK")