aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-11-06 01:32:46 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-11-10 09:09:44 +0100
commitdd469eec407d0fac7cd16b2899fa7a3da85b9460 (patch)
treeb5daa69bea461b20c05aa1cc8dd2f1269c4257b4 /tests
parent17d27805f9e68fb3fa62e1ed817d2b9f44885ee2 (diff)
symbol-scan.pl: do not require autotools
Makes test1119 pass when building with cmake. configurehelp.pm is generated by configure (autotools). As cmake does not provide a separate variable for the C preprocessor, default to cpp. Before commit ef24ecde68a5f577a7f0f423a767620f09a0ab16 ("symbol-scan: use configure script knowledge about how to run the C preprocessor"), this tool would also use 'cpp'. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/symbol-scan.pl16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl
index 91b859bca..89f5eeff9 100644
--- a/tests/symbol-scan.pl
+++ b/tests/symbol-scan.pl
@@ -27,13 +27,23 @@
use strict;
use warnings;
+use vars qw($Cpreprocessor);
#
# configurehelp perl module is generated by configure script
#
-use configurehelp qw(
- $Cpreprocessor
- );
+my $rc = eval {
+ require configurehelp;
+ configurehelp->import(qw(
+ $Cpreprocessor
+ ));
+ 1;
+};
+# Set default values if configure has not generated a configurehelp.pm file.
+# This is the case with cmake.
+if (!$rc) {
+ $Cpreprocessor = 'cpp';
+}
# we may get the dir root pointed out
my $root=$ARGV[0] || ".";