From eeadc06e838a737492625cc3e4d5d5555bb40ff7 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Wed, 20 Aug 2014 16:39:25 +0200 Subject: [PATCH] EIGEN_EXCEPTIONS was not defined in test/main.h, therefore all VERIFY_RAISES_ASSERT tests were not enabled --- Eigen/Core | 2 +- test/main.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Eigen/Core b/Eigen/Core index 9a73fe37b..776b7faf3 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -42,7 +42,7 @@ #define EIGEN_USING_STD_MATH(FUNC) using std::FUNC; #endif -#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) +#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) #define EIGEN_EXCEPTIONS #endif diff --git a/test/main.h b/test/main.h index 3295dcb71..376232cf2 100644 --- a/test/main.h +++ b/test/main.h @@ -76,6 +76,10 @@ namespace Eigen #define EIGEN_DEFAULT_IO_FORMAT IOFormat(4, 0, " ", "\n", "", "", "", "") +#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) + #define EIGEN_EXCEPTIONS +#endif + #ifndef EIGEN_NO_ASSERTION_CHECKING namespace Eigen @@ -172,7 +176,7 @@ namespace Eigen #ifndef VERIFY_RAISES_ASSERT #define VERIFY_RAISES_ASSERT(a) \ - std::cout << "Can't VERIFY_RAISES_ASSERT( " #a " ) with exceptions disabled"; + std::cout << "Can't VERIFY_RAISES_ASSERT( " #a " ) with exceptions disabled\n"; #endif #if !defined(__CUDACC__)