sot-core  4.11.8
Hierarchical task solver plug-in for dynamic-graph.
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 SOT_CORE_WARNING_HH
7 # define SOT_CORE_WARNING_HH
8 
9 // Emits a warning in a portable way.
10 //
11 // To emit a warning, one can insert:
12 //
13 // #pragma message SOT_CORE_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 SOT_CORE_WARN_STRINGISE_IMPL(x) #x
20 # define SOT_CORE_WARN_STRINGISE(x) \
21  SOT_CORE_WARN_STRINGISE_IMPL(x)
22 # ifdef __GNUC__
23 # define SOT_CORE_WARN(exp) ("WARNING: " exp)
24 # else
25 # ifdef _MSC_VER
26 # define FILE_LINE_LINK __FILE__ "(" \
27  SOT_CORE_WARN_STRINGISE(__LINE__) ") : "
28 # define SOT_CORE_WARN(exp) (FILE_LINE_LINK "WARNING: " exp)
29 # else
30 // If the compiler is not recognized, drop the feature.
31 # define SOT_CORE_WARN(MSG) /* nothing */
32 # endif // __MSVC__
33 # endif // __GNUC__
34 
35 #endif