CueMol / cuemol2

CueMol: Molecular Visualization Framework
http://www.cuemol.org/
14 stars 7 forks source link

Compile fails with clang++ MacOSX at isnan() macro check #165

Closed ishitani closed 6 years ago

ishitani commented 7 years ago

In math.h, isnan() is defined as macro, but probably including boost header files undefine it and define std::isnan instead. The current code uses std::isnan only if cplusplus >= 201103L, but boost header may define std::isnan (and undef isnan), despite cplusplus < 201103L (i.e., c++98 mode). Using -std=c++11 flag can avoid this problem, but this option cannot be used with boost::thread (ver 1_57), which fails with error message saying cannot find type_trait header file. (newer version of boost possibly resolved this problem but I havnt't checked yet)

ishitani commented 6 years ago

The problem was fixed by changing the source file using isnan(), by using the ifdef macros.