summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/precomp.test
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
committerTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
commitbd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch)
tree7a520322212d48ebcb9fbe1087e7fca28b76185c /config.tests/unix/precomp.test
downloadqt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz
qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip
Add Qt3 development HEAD version
Diffstat (limited to 'config.tests/unix/precomp.test')
-rwxr-xr-xconfig.tests/unix/precomp.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/config.tests/unix/precomp.test b/config.tests/unix/precomp.test
new file mode 100755
index 0000000..1a553d3
--- /dev/null
+++ b/config.tests/unix/precomp.test
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+PRECOMP_SUPPORT=no
+XPLATFORM=`basename $1`
+XCONFIG=$1/qmake.conf
+VERBOSE=$2
+
+>precomp_header.h
+COMPILER=`grep QMAKE_CC $XCONFIG | sed "s,.*= *,,"`
+if $COMPILER -x c-header precomp_header.h >/dev/null 2>&1; then
+ $COMPILER -x c++-header precomp_header.h && PRECOMP_SUPPORT=yes
+fi
+rm -f precomp_header.h precomp_header.h.gch
+
+# done
+if [ "$PRECOMP_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support enabled."
+ exit 1
+fi