eiquadprog: include/eiquadprog/warning.hpp Source File

eiquadprog 1.3.2 C++ reimplementation of eiquadprog

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