Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions t/002_icpp.t
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,21 @@ my @METHODS = qw(
compiler_command linker_flags
);

run_test(@$_) for @DATA;
for (@DATA) {
SKIP: {
skip 'gcc: provided by Clang on macOS' if $^O eq 'darwin'
&& $_->[0]{cc} eq 'gcc' && ($_->[0]{config}{gccversion} || '') ne 'Clang';
run_test(@$_);
}
}

# mock some compiler output
my $old_capture = \&ExtUtils::CppGuess::_capture;
our $CAPTURES;
{
no warnings "redefine";
*ExtUtils::CppGuess::_capture =
*ExtUtils::CppGuess::_capture_empty_stdin =
sub {
my @cmd = @_;
if (my $result = $CAPTURES->{"@cmd"}) {
Expand Down Expand Up @@ -140,7 +147,10 @@ my @CAPS =
compiler_command => 'g++ -xc++',
linker_flags => '-lstdc++',
},
{ "cc --version" => "cc (Debian 12.2.0-14) 12.2.0" },
{
"cc --version" => "cc (Debian 12.2.0-14) 12.2.0",
"cc -dM -E -" => "#define __GNUC__ 4",
},
],
);

Expand Down