[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebindings/smoke
From: Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date: 2007-10-09 13:18:38
Message-ID: 1191935918.270222.13449.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 723371 by rdale:
* Restore the grab_qglobal_symbols() check as requested by Germain Garand
* However, don't enable it yet as it gives incorrect results, such as QT_NO_LISTVIEW
in qtdefines when there are QListViews in the Qt build.
CCMAIL: kde-bindings@kde.org
CCMAIL: germain@ebooksfrance.org
M +36 -0 kde/qtguess.pl.cmake
M +36 -0 qt/qtguess.pl.cmake
--- trunk/KDE/kdebindings/smoke/kde/qtguess.pl.cmake #723370:723371
@@ -36,6 +36,7 @@
my $tmp = gettmpfile();
my $qtcoreinc = '@QT_QTCORE_INCLUDE_DIR@';
+my $qtinc = '@QT_INCLUDE_DIR@';
my $allinc = '@all_includes@';
my $alllib = '-L@QT_LIBRARY_DIR@ @QT_QTGUI_LIBRARY@';
# my $alllib = '@all_libs@';
@@ -56,6 +57,7 @@
print "Number of defines to be tested : $used/$total\n\n" unless $opt_q;
open( QTDEFS, ">>".($opt_o || "qtdefines") ) or die "Can't open output file: $!\n";
+# grab_qglobal_symbols();
preliminary_test();
perform_all_tests();
@@ -66,6 +68,40 @@
#--------------------------------------------------------------#
+sub grab_qglobal_symbols
+{
+ my $cmd = "$cc -E -D__cplusplus -dM -I$qtinc -I$qtcoreinc $qtcoreinc/qglobal.h \
2>/dev/null"; +print("cmd: '$cmd'\n");
+ my $symbols = `$cmd`;
+ for(0..1)
+ {
+ if( check_exit_status($?) )
+ {
+print("In grab_qglobal_symbols()\n");
+ while( $symbols =~/^#\s*define\s*(QT_\S+)/gm )
+ {
+ $qtdefs{$1} = 1;
+ }
+ print "Found ". scalar( keys %qtdefs )." predefined symbol".((scalar( keys %qtdefs \
) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtdefs)); + while( \
$symbols =~/^#\s*define\s*QT_MODULE_(\S+)/gm ) + {
+ $qtundefs{"QT_NO_$1"} = 1;
+ }
+ print "Found ". scalar( keys %qtundefs )." undefined symbol".((scalar( keys \
%qtundefs ) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtundefs)); + \
last; + }
+ elsif(! $_) # first try
+ {
+ print "Failed to run $cmd.\nTrying without __cplusplus (might be already \
defined)\n"; + $cmd = "$cc -E -dM -I$qtinc/QtCore \
$qtinc/QtCore/qglobal.h 2>/dev/null"; + $symbols = `$cmd`;
+ next;
+ }
+ }
+}
+
+#--------------------------------------------------------------#
+
sub gettmpfile
{
my $tmpdir = $ENV{'TMP'} || ".";
--- trunk/KDE/kdebindings/smoke/qt/qtguess.pl.cmake #723370:723371
@@ -36,6 +36,7 @@
my $tmp = gettmpfile();
my $qtcoreinc = '@QT_QTCORE_INCLUDE_DIR@';
+my $qtinc = '@QT_INCLUDE_DIR@';
my $allinc = '@all_includes@';
my $alllib = '@all_libs@';
@@ -55,6 +56,7 @@
print "Number of defines to be tested : $used/$total\n\n" unless $opt_q;
open( QTDEFS, ">>".($opt_o || "qtdefines") ) or die "Can't open output file: $!\n";
+# grab_qglobal_symbols();
preliminary_test();
perform_all_tests();
@@ -65,6 +67,40 @@
#--------------------------------------------------------------#
+sub grab_qglobal_symbols
+{
+ my $cmd = "$cc -E -D__cplusplus -dM -I$qtinc -I$qtcoreinc $qtcoreinc/qglobal.h \
2>/dev/null"; +print("cmd: '$cmd'\n");
+ my $symbols = `$cmd`;
+ for(0..1)
+ {
+ if( check_exit_status($?) )
+ {
+print("In grab_qglobal_symbols()\n");
+ while( $symbols =~/^#\s*define\s*(QT_\S+)/gm )
+ {
+ $qtdefs{$1} = 1;
+ }
+ print "Found ". scalar( keys %qtdefs )." predefined symbol".((scalar( keys %qtdefs \
) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtdefs)); + while( \
$symbols =~/^#\s*define\s*QT_MODULE_(\S+)/gm ) + {
+ $qtundefs{"QT_NO_$1"} = 1;
+ }
+ print "Found ". scalar( keys %qtundefs )." undefined symbol".((scalar( keys \
%qtundefs ) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtundefs)); + \
last; + }
+ elsif(! $_) # first try
+ {
+ print "Failed to run $cmd.\nTrying without __cplusplus (might be already \
defined)\n"; + $cmd = "$cc -E -dM -I$qtinc/QtCore \
$qtinc/QtCore/qglobal.h 2>/dev/null"; + $symbols = `$cmd`;
+ next;
+ }
+ }
+}
+
+#--------------------------------------------------------------#
+
sub gettmpfile
{
my $tmpdir = $ENV{'TMP'} || ".";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic