BioCMAMC-ST
eigen_diag.hpp
1#ifndef __EIGEN_DIAG_HPP__
2#define __EIGEN_DIAG_HPP__
3
4#define DO_PRAGMA(x) _Pragma(#x)
5
6#ifndef IGNORE_EIGEN_DIAG
7
8# define EIGEN_DIAG_PUSH \
9 DO_PRAGMA(GCC diagnostic push) \
10 DO_PRAGMA(GCC diagnostic ignored "-Wunused-but-set-variable") \
11 DO_PRAGMA(GCC diagnostic ignored "-Wnan-infinity-disabled")
12
13# define EIGEN_DIAG_POP DO_PRAGMA(GCC diagnostic pop)
14
15#else
16
17/* Diagnostics disabled → macros expand to nothing */
18# define EIGEN_DIAG_PUSH
19# define EIGEN_DIAG_POP
20
21#endif
22
23#endif