File: Build.PL

package info (click to toggle)
libextutils-cppguess-perl 0.27-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: perl: 742; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl -w

use strict;
use blib '../..';
use Module::Build;
use ExtUtils::CppGuess;
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,
    );
$build->create_build_script;