tests: Autotest now targets several architectures on MacOS, minor report refactoring

git-svn-id: http://pugixml.googlecode.com/svn/trunk@509 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2010-06-10 17:52:08 +00:00
parent c74fe071dd
commit 6e1777619e
3 changed files with 35 additions and 10 deletions

View File

@ -14,6 +14,20 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) )
if ( $(OS) != MACOSX ) if ( $(OS) != MACOSX )
{ {
LDFLAGS += -static-libgcc -static ; LDFLAGS += -static-libgcc -static ;
ARCH = "" ;
}
else
{
if ( $(toolset:I=_x64) )
{
ARCH = -arch x86_64 ;
}
else if ( $(toolset:I=_ppc) )
{
ARCH = -arch ppc ;
}
LDFLAGS += $(ARCH) ;
} }
rule GetCFlags CONFIG : DEFINES rule GetCFlags CONFIG : DEFINES
@ -46,6 +60,8 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) )
RESULT += -fno-exceptions ; RESULT += -fno-exceptions ;
} }
RESULT += $(ARCH) ;
return $(RESULT) ; return $(RESULT) ;
} }

View File

@ -20,11 +20,13 @@ sub gcctoolset
my $gccversion = `gcc -dumpversion`; my $gccversion = `gcc -dumpversion`;
chomp($gccversion); chomp($gccversion);
return "gcc$gccversion"; my $gcc = "gcc$gccversion";
return ($^O =~ /darwin/) ? ($gcc, "${gcc}_x64", "${gcc}_ppc") : (`uname -m` =~ /64/) ? ("${gcc}_x64") : ($gcc);
} }
$fast = (shift eq 'fast'); $fast = (shift eq 'fast');
@toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, ic9, ic9_x64, ic10, ic10_x64, ic11, ic11_x64, mingw34, mingw44, mingw45, mingw45_0x, mingw46_x64, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64) : ($^O =~ /solaris/) ? (suncc) : (&gcctoolset()); @toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, ic9, ic9_x64, ic10, ic10_x64, ic11, ic11_x64, mingw34, mingw44, mingw45, mingw45_0x, mingw46_x64, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64) : ($^O =~ /solaris/) ? (suncc) : &gcctoolset();
@configurations = (debug, release); @configurations = (debug, release);
@defines = (PUGIXML_NO_XPATH, PUGIXML_NO_EXCEPTIONS, PUGIXML_NO_STL, PUGIXML_WCHAR_MODE); @defines = (PUGIXML_NO_XPATH, PUGIXML_NO_EXCEPTIONS, PUGIXML_NO_STL, PUGIXML_WCHAR_MODE);
$stddefine = 'PUGIXML_STANDARD'; $stddefine = 'PUGIXML_STANDARD';

View File

@ -1,6 +1,17 @@
#!/usr/bin/perl #!/usr/bin/perl
# pretty-printing # pretty-printing
sub prettysuffix
{
my $suffix = shift;
return " C++0x" if ($suffix eq '_0x');
return " x64" if ($suffix eq '_x64');
return " PowerPC" if ($suffix eq '_ppc');
return "";
}
sub prettytoolset sub prettytoolset
{ {
my $toolset = shift; my $toolset = shift;
@ -10,15 +21,11 @@ sub prettytoolset
return "Digital Mars C++ 8.51" if ($toolset eq 'dmc'); return "Digital Mars C++ 8.51" if ($toolset eq 'dmc');
return "Sun C++ 5.10" if ($toolset eq 'suncc'); return "Sun C++ 5.10" if ($toolset eq 'suncc');
return "Intel C++ Compiler $1.0" if ($toolset =~ /^ic(\d+)$/); return "Intel C++ Compiler $1.0" . prettysuffix($2) if ($toolset =~ /^ic(\d+)(.*)$/);
return "Intel C++ Compiler $1.0 x64" if ($toolset =~ /^ic(\d+)_x64$/); return "MinGW (GCC $1.$2)" . prettysuffix($3) if ($toolset =~ /^mingw(\d)(\d)(.*)$/);
return "MinGW (GCC $1.$2)" if ($toolset =~ /^mingw(\d)(\d)$/);
return "MinGW (GCC $1.$2) C++0x" if ($toolset =~ /^mingw(\d)(\d)_0x$/);
return "MinGW (GCC $1.$2) x64" if ($toolset =~ /^mingw(\d)(\d)_x64$/);
return "Microsoft Visual C++ 7.1" if ($toolset eq 'msvc71'); return "Microsoft Visual C++ 7.1" if ($toolset eq 'msvc71');
return "Microsoft Visual C++ $1.0" if ($toolset =~ /^msvc(\d+)$/); return "Microsoft Visual C++ $1.0" . prettysuffix($2) if ($toolset =~ /^msvc(\d+)(.*)$/);
return "Microsoft Visual C++ $1.0 x64" if ($toolset =~ /^msvc(\d+)_x64$/); return "GNU C++ Compiler $1" . prettysuffix($2) if ($toolset =~ /^gcc([\d.]*)(.*)$/);
return "GNU C++ Compiler $1" if ($toolset =~ /^gcc(.*)$/);
$toolset; $toolset;
} }