hpp-centroidal-dynamics: include/hpp/centroidal-dynamics/warning.hh Source File

hpp-centroidal-dynamics 9.0.2 Utility classes for testing (robust) equilibrium of a system in contact with the environment, and other centroidal dynamics methods.

warning.hh
Go to the documentation of this file.
1 /*
2 * This file has been automatically generated by the jrl-cmakemodules.
3 * Please see https://github.com/jrl-umi3218/jrl-cmakemodules/blob/master/warning.hh.cmake for details.
4 */
5
6 #ifndef HPP_CENTROIDAL_DYNAMICS_WARNING_HH
7 # define HPP_CENTROIDAL_DYNAMICS_WARNING_HH
8
9 // Emits a warning in a portable way.
10 //
11 // To emit a warning, one can insert:
12 //
13 // #pragma message HPP_CENTROIDAL_DYNAMICS_WARN("your warning message here")
14 //
15 // The use of this syntax is required as this is /not/ a standardized
16 // feature of C++ language or preprocessor, even if most of the
17 // compilers support it.
18
19 # define HPP_CENTROIDAL_DYNAMICS_WARN_STRINGISE_IMPL(x) #x
20 # define HPP_CENTROIDAL_DYNAMICS_WARN_STRINGISE(x) \
21 HPP_CENTROIDAL_DYNAMICS_WARN_STRINGISE_IMPL(x)
22 # ifdef __GNUC__
23 # define HPP_CENTROIDAL_DYNAMICS_WARN(exp) ("WARNING: " exp)
24 # else
25 # ifdef _MSC_VER
26 # define FILE_LINE_LINK __FILE__ "(" \
27 HPP_CENTROIDAL_DYNAMICS_WARN_STRINGISE(__LINE__) ") : "
28 # define HPP_CENTROIDAL_DYNAMICS_WARN(exp) (FILE_LINE_LINK "WARNING: " exp)
29 # else
30 // If the compiler is not recognized, drop the feature.
31 # define HPP_CENTROIDAL_DYNAMICS_WARN(MSG) /* nothing */
32 # endif // __MSVC__
33 # endif // __GNUC__
34
35 #endif