I am using a simple ccache-like script for NASM. It runs the preprocessor, compares hash of output, nasm binary and command line except -D. It works fine, except %warning directive isn't working:
$ nasm -v
NASM version 2.10rc3 compiled on Dec 23 2010
# prepare the test file
$ echo '%warning WARNING' > tst.S
# normal output
$ /mnt/svn/nasm/nasm tst.S
tst.S:1: warning: WARNING
# output is done to stderr
# output with -e
$ /mnt/svn/nasm/nasm tst.S -e
# no output, nor to stderr, nor to stdout
%error and %fatal work fine (both with and without -e the message is output to stderr)