Properly set BLA_VENDOR to FlexiBLAS for cmake >= 3.19

This commit is contained in:
Björn Esser 2021-07-13 20:42:28 +02:00
parent 6547adc280
commit ce1ab84481
No known key found for this signature in database
GPG Key ID: F52E98007594C21D

View File

@ -2,7 +2,7 @@
Name: dolfin
Version: 2019.1.0.post0
%global fenics_version 2019.1
Release: 17%{?dist}
Release: 18%{?dist}
Summary: FEniCS computational backend and problem solving environment
License: LGPLv3+
@ -11,10 +11,13 @@ Source0: https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-%{v
Source1: https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-%{version}.tar.gz.asc
Source2: 3083BE4C722232E28AD0828CBED06106DD22BAB3.gpg
%if 0%{?fedora} >= 33
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
%global blaslib flexiblas
%global cmake_blas_flags -DBLA_VENDOR=FlexiBLAS
%else
%global blaslib openblas
%global blasvar o
%global cmake_blas_flags -DBLAS_LIBRARIES=%{_libdir}/lib%{blaslib}%{blasvar}.so
%endif
BuildRequires: gcc-c++
@ -100,8 +103,8 @@ sed -r -i 's|boost/detail/endian.hpp|boost/endian/arithmetic.hpp|' \
%build
# %%_mpich_load
mkdir -p build && cd build
CFLAGS=-Wno-unused-variable %cmake .. \
-DBLAS_LIBRARIES=-l%{blaslib} \
CFLAGS="%{optflags} -Wno-unused-variable" %cmake .. \
%{cmake_blas_flags} \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=off
%make_build
@ -165,6 +168,9 @@ ctest -V %{?_smp_mflags}
%{python3_sitearch}/fenics_dolfin-%{fenics_version}*-py%{python3_version}.egg-info/
%changelog
* Tue Jul 13 2021 Björn Esser <besser82@fedoraproject.org> - 2019.1.0.post0-18
- Properly set BLA_VENDOR to FlexiBLAS for cmake >= 3.19
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2019.1.0.post0-17
- Rebuilt for Python 3.10