]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Check that compiler is actually able to use precompiled headers
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 23 Aug 2010 05:56:52 +0000 (07:56 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 23 Aug 2010 06:00:13 +0000 (08:00 +0200)
test.sh

diff --git a/test.sh b/test.sh
index 94d5cf8a11e3cb6c4188041516aaaee23e11bf3a..a860da7cf9bd03360d1cbd5cb665b705274ef76e 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -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