ExtUtils-CppGuess
view release on metacpan or search on metacpan
t/010_module_build.t view on Meta::CPAN
use strict;
use Test::More;
BEGIN {
plan skip_all => 'no Module::Build' if !eval { require Module::Build; 1 };
plan skip_all => 'no ExtUtils::CBuilder' if !eval { require ExtUtils::CBuilder; 1 };
plan skip_all => 'perl 5.8.8 and EU::CBuilder bug if CC has "++"' if $ExtUtils::CBuilder::VERSION <= 0.280230 and $] lt '5.010';
}
use lib 't/lib';
use TestUtils;
diag "Module::Build version: $Module::Build::VERSION";
diag "ExtUtils::CBuilder version: $ExtUtils::CBuilder::VERSION";
my $separator = ( '=' x 40 . "\n" );
prepare_test( 't/module', 't/module_build' );
t/module/Build.PL view on Meta::CPAN
use ExtUtils::ParseXS;
my $guess = ExtUtils::CppGuess->new;
$guess->add_extra_compiler_flags(
'-DINCLUDE_DOT=' .
($guess->iostream_fname =~ /\./ ? 1 : 0)
);
# broken on 5.14, on EUPXS 3.04_01 to 3.35
if ($ExtUtils::ParseXS::VERSION > 3.04) {
if ($] lt '5.016000') {
$guess->add_extra_compiler_flags('-DCLANG_WORKAROUND_514');
} elsif ($] lt '5.018000') {
$guess->add_extra_compiler_flags('-DCLANG_WORKAROUND_516');
}
}
my $build = Module::Build->new
( module_name => 'CppGuessTest',
dist_abstract => 'a test module',
license => 'perl',
xs_files => { 'CppGuessTest.xs' => 'lib/CppGuessTest.xs' },
$guess->module_build_options,
t/module/Makefile.PL view on Meta::CPAN
use strict;
use blib '../..';
use ExtUtils::MakeMaker;
use ExtUtils::CppGuess;
use ExtUtils::ParseXS;
my $guess = ExtUtils::CppGuess->new;
# broken on 5.14, on EUPXS 3.04_01 to 3.35
if ($ExtUtils::ParseXS::VERSION > 3.04) {
if ($] lt '5.016000') {
$guess->add_extra_compiler_flags('-DCLANG_WORKAROUND_514');
} elsif ($] lt '5.018000') {
$guess->add_extra_compiler_flags('-DCLANG_WORKAROUND_516');
}
}
$guess->add_extra_compiler_flags(
'-DINCLUDE_DOT=' .
($guess->iostream_fname =~ /\./ ? 1 : 0)
);
WriteMakefile
( run in 0.524 second using v1.01-cache-2.11-cpan-cc502c75498 )