From: Guido Kanschat Date: Tue, 22 Mar 2005 16:03:04 +0000 (+0000) Subject: AssertLIB macros for blas, lapack and umfpack X-Git-Tag: v8.0.0~14335 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e5c2bf468f779b2a34a550bb30d3a3a0c919074;p=dealii.git AssertLIB macros for blas, lapack and umfpack git-svn-id: https://svn.dealii.org/trunk@10203 0785d39b-7218-0410-832d-ea1e28bc413d --- 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;