test: Check that compiler is actually able to use precompiled headers

This commit is contained in:
Joel Rosdahl 2010-08-23 07:56:52 +02:00
parent 9a5ce3c79e
commit 3f780612d9

View File

@ -1604,10 +1604,10 @@ EOF
cat <<EOF >pch.h
#include <stdlib.h>
EOF
if $COMPILER -fpch-preprocess pch.h 2>/dev/null; then
if $COMPILER -fpch-preprocess pch.h 2>/dev/null && [ -f pch.h.gch ] && $COMPILER pch.c -o pch; then
:
else
echo "Compiler ($COMPILER) doesn't support precompiled headers -- not running pch test"
echo "Compiler (`$COMPILER --version | head -1`) doesn't support precompiled headers -- not running pch test"
return
fi