1 | # ------------------------------------------------------------------------------ |
---|
2 | # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. |
---|
3 | # |
---|
4 | # This file is part of FCM, tools for managing and building source code. |
---|
5 | # |
---|
6 | # FCM is free software: you can redistribute it and/or modify |
---|
7 | # it under the terms of the GNU General Public License as published by |
---|
8 | # the Free Software Foundation, either version 3 of the License, or |
---|
9 | # (at your option) any later version. |
---|
10 | # |
---|
11 | # FCM is distributed in the hope that it will be useful, |
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | # GNU General Public License for more details. |
---|
15 | # |
---|
16 | # You should have received a copy of the GNU General Public License |
---|
17 | # along with FCM. If not, see <http://www.gnu.org/licenses/>. |
---|
18 | # ------------------------------------------------------------------------------ |
---|
19 | use strict; |
---|
20 | use warnings; |
---|
21 | # ------------------------------------------------------------------------------ |
---|
22 | package FCM::System::Make::Build::Task::Link::CXX; |
---|
23 | use base qw{FCM::System::Make::Build::Task::Link}; |
---|
24 | |
---|
25 | use FCM::System::Make::Build::Task::Compile::CXX; |
---|
26 | |
---|
27 | our %PROP_OF = ( |
---|
28 | %FCM::System::Make::Build::Task::Link::PROP_OF, |
---|
29 | ( map {$_ => $FCM::System::Make::Build::Task::Compile::CXX::PROP_OF{$_}} |
---|
30 | qw{cxx cxx.flag-omp cxx.flag-output} |
---|
31 | ), |
---|
32 | 'cxx.flags-ld' => '', |
---|
33 | 'cxx.flag-lib' => '-l%s', |
---|
34 | 'cxx.flag-lib-path' => '-L%s', |
---|
35 | 'cxx.libs' => '', |
---|
36 | 'cxx.lib-paths' => '', |
---|
37 | ); |
---|
38 | |
---|
39 | sub new { |
---|
40 | my ($class, $attrib_ref) = @_; |
---|
41 | bless( |
---|
42 | $class->SUPER::new( |
---|
43 | {name => 'cxx', prop_of => {%PROP_OF}, %{$attrib_ref}}, |
---|
44 | ), |
---|
45 | $class, |
---|
46 | ); |
---|
47 | } |
---|
48 | |
---|
49 | # ------------------------------------------------------------------------------ |
---|
50 | 1; |
---|
51 | __END__ |
---|
52 | |
---|
53 | =head1 NAME |
---|
54 | |
---|
55 | FCM::System::Make::Build::Task::Link::CXX |
---|
56 | |
---|
57 | =head1 SYNOPSIS |
---|
58 | |
---|
59 | use FCM::System::Make::Build::Task::Link::CXX; |
---|
60 | my $task = FCM::System::Make::Build::Task::Link::CXX->new(\%attrib); |
---|
61 | $task->main($target); |
---|
62 | |
---|
63 | =head1 DESCRIPTION |
---|
64 | |
---|
65 | Wraps L<FCM::System::Make::Build::Task::Link> to link a C++ object into an |
---|
66 | executable. |
---|
67 | |
---|
68 | =head1 COPYRIGHT |
---|
69 | |
---|
70 | Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. |
---|
71 | |
---|
72 | =cut |
---|