mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
Add BUILD_MESSAGE() macro
This commit introduces the BUILD_MESSAGE() macro. It uses _Pragma("message"),
with compilers that support that, to output a warning-like compile-time message
without blocking the compilation.
Used by next commit.
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
This commit is contained in:
committed by
Jarno Rajahalme
parent
30f4d875f5
commit
aa8ea22366
@@ -221,4 +221,14 @@
|
||||
#define OVS_PREFETCH_WRITE(addr)
|
||||
#endif
|
||||
|
||||
/* Output a message (not an error) while compiling without failing the
|
||||
* compilation process */
|
||||
#if HAVE_PRAGMA_MESSAGE
|
||||
#define DO_PRAGMA(x) _Pragma(#x)
|
||||
#define BUILD_MESSAGE(x) \
|
||||
DO_PRAGMA(message(x))
|
||||
#else
|
||||
#define BUILD_MESSAGE(x)
|
||||
#endif
|
||||
|
||||
#endif /* compiler.h */
|
||||
|
||||
Reference in New Issue
Block a user