gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
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 GEPETTO_VIEWER_WARNING_HH
7# define GEPETTO_VIEWER_WARNING_HH
8
9// Emits a warning in a portable way.
10//
11// To emit a warning, one can insert:
12//
13// #pragma message GEPETTO_VIEWER_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 GEPETTO_VIEWER_WARN_STRINGISE_IMPL(x) #x
20# define GEPETTO_VIEWER_WARN_STRINGISE(x) \
21 GEPETTO_VIEWER_WARN_STRINGISE_IMPL(x)
22# ifdef __GNUC__
23# define GEPETTO_VIEWER_WARN(exp) ("WARNING: " exp)
24# else
25# ifdef _MSC_VER
26# define FILE_LINE_LINK __FILE__ "(" \
27 GEPETTO_VIEWER_WARN_STRINGISE(__LINE__) ") : "
28# define GEPETTO_VIEWER_WARN(exp) (FILE_LINE_LINK "WARNING: " exp)
29# else
30// If the compiler is not recognized, drop the feature.
31# define GEPETTO_VIEWER_WARN(MSG) /* nothing */
32# endif // __MSVC__
33# endif // __GNUC__
34
35#endif