git: c2721bb791bc - main - Mk/Uses/blaslapack.mk: set BLA_VENDOR to be used by cmake

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Sat, 12 Nov 2022 13:33:02 UTC
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c2721bb791bcce7ec23f6df173500ca200ff3b66

commit c2721bb791bcce7ec23f6df173500ca200ff3b66
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-11-11 15:13:16 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-11-12 13:33:00 +0000

    Mk/Uses/blaslapack.mk: set BLA_VENDOR to be used by cmake
    
    See $LOCALBASE/share/cmake/Modules/FindBLAS.cmake: this will guide cmake
    to choose the right libraries.
---
 Mk/Uses/blaslapack.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Mk/Uses/blaslapack.mk b/Mk/Uses/blaslapack.mk
index 467173412d07..fece76dbc93d 100644
--- a/Mk/Uses/blaslapack.mk
+++ b/Mk/Uses/blaslapack.mk
@@ -27,24 +27,32 @@ _BLASLIB=	ptf77blas
 LAPACKLIB=	-lalapack -lptcblas
 _ATLASLIB=	atlas
 ATLASLIB=	-l${_ATLASLIB}
+BLA_VENDOR=	ATLAS
 .  elif ${blaslapack_ARGS} == gotoblas
 LIB_DEPENDS+=	libgoto2.so:math/gotoblas
 LIB_DEPENDS+=	liblapack.so:math/lapack
 _BLASLIB=	goto2p
 LAPACKLIB=	-lgoto2p
+BLA_VENDOR=	Goto
 .  elif ${blaslapack_ARGS} == netlib
 LIB_DEPENDS+=	libblas.so:math/blas
 LIB_DEPENDS+=	liblapack.so:math/lapack
 _BLASLIB=	blas
 LAPACKLIB=	-llapack
+BLA_VENDOR=	Generic
 .  elif ${blaslapack_ARGS} == openblas
 LIB_DEPENDS+=	libopenblas.so:math/openblas
 _BLASLIB=	openblas
 LAPACKLIB=	-lopenblas
+BLA_VENDOR=	OpenBLAS
 .  else
 IGNORE=		USES=blaslapack: invalid arguments: ${blaslapack_ARGS}
 .  endif
 
 BLASLIB=	-l${_BLASLIB}
 
+.  if ${USES:Mcmake} || ${USES:Mcmake\:*}
+CONFIGURE_ENV+=	BLA_VENDOR="${BLA_VENDOR}"
+.  endif
+
 .endif