[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Turn off C compiler warnings in automake
From: |
Alex Vong |
Subject: |
Turn off C compiler warnings in automake |
Date: |
Mon, 22 Jun 2015 21:44:23 +0800 |
Hi everyone,
Is there a portable way to silent C compiler warnings in automake? I
think of 2 ways of doing it but both ways have serious limitations.
1. hand-craft automake rules with `2>/dev/null' appended on the command
limitation: tedious, defeat the purpose of using automake (not _auto_ enough)
2. add `-w' to myprog_CFLAGS
limitation: it is GCC-specific and not portable (c99 does not specify
this switch)
Currently, I am using method 1 (hand-crafting) to achieve per-object
flags. However, I learnt that I can use convience library to simulate
per-object flags so I rewrite my Makefile.am to use convience library,
It looks much cleaner!
Is there any easy way to turn off c compiler warnings (those printed
to stderr) portably?
Thanks all!
Alex
- Turn off C compiler warnings in automake,
Alex Vong <=