commit:     b1e719993d5cbc7e14c7d50950b097ee74f7d328
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 30 06:42:15 2021 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sat Oct 30 06:44:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1e71999

sci-libs/dealii: allow sse2/avx2/avx512 instructions when enabled

Closes: https://bugs.gentoo.org/820809
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-libs/dealii/dealii-9.3.1-r1.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sci-libs/dealii/dealii-9.3.1-r1.ebuild 
b/sci-libs/dealii/dealii-9.3.1-r1.ebuild
index dd024050fed..ef012f290e0 100644
--- a/sci-libs/dealii/dealii-9.3.1-r1.ebuild
+++ b/sci-libs/dealii/dealii-9.3.1-r1.ebuild
@@ -8,7 +8,7 @@ EAPI=7
 # any of these modules:
 CMAKE_REMOVE_MODULES_LIST=""
 
-inherit cmake multilib
+inherit cmake flag-o-matic multilib
 
 DESCRIPTION="Solving partial differential equations with the finite element 
method"
 HOMEPAGE="https://www.dealii.org/";
@@ -138,10 +138,13 @@ src_configure() {
        # variables if a "higher" variant is set
        if use cpu_flags_x86_avx512f; then
                mycmakeargs+=( -DDEAL_II_HAVE_AVX512=yes )
+               append-cxxflags "-mavx512f"
        elif use cpu_flags_x86_avx; then
                mycmakeargs+=( -DDEAL_II_HAVE_AVX=yes )
+               append-cxxflags "-mavx2"
        elif use cpu_flags_x86_avx; then
                mycmakeargs+=( -DDEAL_II_HAVE_SSE2=yes )
+               append-cxxflags "-msse2"
        fi
 
        cmake_src_configure

Reply via email to