1ExtUtils::CppGuess(3) User Contributed Perl DocumentationExtUtils::CppGuess(3)
2
3
4

NAME

6       ExtUtils::CppGuess - guess C++ compiler and flags
7

SYNOPSIS

9       With Extutils::MakeMaker:
10
11           use ExtUtils::CppGuess;
12
13           my $guess = ExtUtils::CppGuess->new;
14
15           WriteMakefile
16             ( # MakeMaker args,
17               $guess->makemaker_options,
18               );
19
20       With Module::Build:
21
22           my $guess = ExtUtils::CppGuess->new;
23
24           my $build = Module::Build->new
25             ( # Module::Build arguments
26               $guess->module_build_options,
27               );
28           $build->create_build_script;
29

DESCRIPTION

31       "ExtUtils::CppGuess" attempts to guess the system's C++ compiler that
32       is compatible with the C compiler that your perl was built with.
33
34       It can generate the necessary options to the Module::Build constructor
35       or to ExtUtils::MakeMaker's "WriteMakefile" function.
36

METHODS

38   new
39       Creates a new "ExtUtils::CppGuess" object.  Takes the path to the C
40       compiler as the "cc" argument, but falls back to the value of
41       $Config{cc}, which should be what you want anyway.
42
43       You can specify "extra_compiler_flags" and "extra_linker_flags" (as
44       strings) which will be merged in with the auto-detected ones.
45
46   module_build_options
47       Returns the correct options to the constructor of "Module::Build".
48       These are:
49
50           extra_compiler_flags
51           extra_linker_flags
52
53   makemaker_options
54       Returns the correct options to the "WriteMakefile" function of
55       "ExtUtils::MakeMaker".  These are:
56
57           CCFLAGS
58           dynamic_lib => { OTHERLDFLAGS => ... }
59
60       If you specify the extra compiler or linker flags in the constructor,
61       they'll be merged into "CCFLAGS" or "OTHERLDFLAGS" respectively.
62
63   is_gcc
64       Returns true if the detected compiler is in the gcc family.
65
66   is_msvc
67       Returns true if the detected compiler is in the MS VC family.
68
69   add_extra_compiler_flags
70       Takes a string as argument that is added to the string of extra
71       compiler flags.
72
73   add_extra_linker_flags
74       Takes a string as argument that is added to the string of extra linker
75       flags.
76

AUTHOR

78       Mattia Barbon <mbarbon@cpan.org>
79
80       Steffen Mueller <smueller@cpan.org>
81
82       Tobias Leich <froggs@cpan.org>
83
85       Copyright 2010, 2011 by Mattia Barbon.
86
87       This program is free software; you can redistribute it and/or modify it
88       under the same terms as Perl itself.
89
90
91
92perl v5.28.1                      2017-10-21             ExtUtils::CppGuess(3)
Impressum