File: README

package info (click to toggle)
libextutils-cppguess-perl 0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 168 kB
  • sloc: perl: 696; makefile: 2
file content (85 lines) | stat: -rw-r--r-- 2,363 bytes parent folder | download | duplicates (5)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
NAME
    ExtUtils::CppGuess - guess C++ compiler and flags

SYNOPSIS
    With Extutils::MakeMaker:

        use ExtUtils::CppGuess;
    
        my $guess = ExtUtils::CppGuess->new;
    
        WriteMakefile
          ( # MakeMaker args,
            $guess->makemaker_options,
            );

    With Module::Build:

        my $guess = ExtUtils::CppGuess->new;
    
        my $build = Module::Build->new
          ( # Module::Build arguments
            $guess->module_build_options,
            );
        $build->create_build_script;

DESCRIPTION
    "ExtUtils::CppGuess" attempts to guess the system's C++ compiler that is
    compatible with the C compiler that your perl was built with.

    It can generate the necessary options to the Module::Build constructor
    or to ExtUtils::MakeMaker's "WriteMakefile" function.

METHODS
  new
    Creates a new "ExtUtils::CppGuess" object. Takes the path to the C
    compiler as the "cc" argument, but falls back to the value of
    $Config{cc}, which should be what you want anyway.

    You can specify "extra_compiler_flags" and "extra_linker_flags" (as
    strings) which will be merged in with the auto-detected ones.

  module_build_options
    Returns the correct options to the constructor of "Module::Build". These
    are:

        extra_compiler_flags
        extra_linker_flags

  makemaker_options
    Returns the correct options to the "WriteMakefile" function of
    "ExtUtils::MakeMaker". These are:

        CCFLAGS
        dynamic_lib => { OTHERLDFLAGS => ... }

    If you specify the extra compiler or linker flags in the constructor,
    they'll be merged into "CCFLAGS" or "OTHERLDFLAGS" respectively.

  is_gcc
    Returns true if the detected compiler is in the gcc family.

  is_msvc
    Returns true if the detected compiler is in the MS VC family.

  add_extra_compiler_flags
    Takes a string as argument that is added to the string of extra compiler
    flags.

  add_extra_linker_flags
    Takes a string as argument that is added to the string of extra linker
    flags.

AUTHOR
    Mattia Barbon <mbarbon@cpan.org>

    Steffen Mueller <smueller@cpan.org>

    Tobias Leich <froggs@cpan.org>

COPYRIGHT AND LICENSE
    Copyright 2010, 2011 by Mattia Barbon.

    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.