From 4e5c2bf468f779b2a34a550bb30d3a3a0c919074 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Tue, 22 Mar 2005 16:03:04 +0000 Subject: [PATCH] AssertLIB macros for blas, lapack and umfpack git-svn-id: https://svn.dealii.org/trunk@10203 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/exceptions.h | 39 ++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/deal.II/base/include/base/exceptions.h b/deal.II/base/include/base/exceptions.h index 6c7a2a3b04..ff5f22a09d 100644 --- a/deal.II/base/include/base/exceptions.h +++ b/deal.II/base/include/base/exceptions.h @@ -1042,7 +1042,7 @@ namespace StandardExceptions * --with-umfpack and check * if it is actually included. */ - DeclException0 (ExcNeedsUMFPack); + DeclException0 (ExcNeedsUMFPACK); /** * This function requires the METIS @@ -1060,11 +1060,46 @@ namespace StandardExceptions * --with-petsc and check * if it is actually included. */ - DeclException0 (ExcNeedsPetsc); + DeclException0 (ExcNeedsPETSC); //@} } +/* + * Unfortunately, the following must be repeated for each library, + * since we cannot have ifdefs in macros. + */ + +/** + * Assert support for the BLAS library + */ +#ifdef HAVE_LIBBLAS +# define AssertBLAS {} +#else +# define AssertBLAS Assert(false, ExcNeedsBLAS()) +#endif + + +/** + * Assert support for the LAPACK library + */ +#ifdef HAVE_LIBLAPACK +# define AssertLAPACK {} +#else +# define AssertLAPACK Assert(false, ExcNeedsLAPACK()) +#endif + + +/** + * Assert support for the UMFPACK library + */ +#ifdef HAVE_LIBUMFPACK +# define AssertUMFPACK {} +#else +# define AssertUMFPACK Assert(false, ExcNeedsUMFPACK()) +#endif + + using namespace StandardExceptions; -- 2.39.5