Commit ef189bd3 authored by T.J. Corona's avatar T.J. Corona

Patch moab to prefer std::isfinite/isfinite over finite.

This will stop the generation of numerous warnings on OSX.
parent e2a0a9c9
...@@ -20,16 +20,19 @@ ...@@ -20,16 +20,19 @@
#include "moab/Forward.hpp" #include "moab/Forward.hpp"
#include "moab/CartVect.hpp" #include "moab/CartVect.hpp"
#include <math.h>
#if defined MOAB_HAVE_ISFINITE
#define moab_isfinite(f) isfinite(f)
#elif defined MOAB_HAVE_STDISFINITE
#include <cmath> #include <cmath>
#define moab_isfinite(f) std::isfinite(f) #if defined MOAB_HAVE_ISFINITE
# define moab_isfinite(f) isfinite(f)
//If we have c++11 support, we will have std::isfinite
#elif (defined(__cplusplus) && __cplusplus >= 201103L)
# define moab_isfinite(f) std::isfinite(f)
#elif (defined(_WIN32) && defined(_MSC_VER)) || defined(__MINGW32__)
# include <float.h>
# define moab_isfinite(A) _finite(A)
#elif defined MOAB_HAVE_FINITE #elif defined MOAB_HAVE_FINITE
#define moab_isfinite(f) finite(f) # define moab_isfinite(f) finite(f)
#else #else
#define moab_isfinite(f) (!isinf(f) && !isnan(f)) # define moab_isfinite(f) (!isinf(f) && !isnan(f))
#endif #endif
namespace moab { namespace moab {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment