source: LMDZ6/branches/Amaury_dev/tools/fcm/lib/FCM/System/Make/Build/Task/Link/CXX.pm @ 5129

Last change on this file since 5129 was 5129, checked in by abarral, 8 weeks ago

Re-add removed by mistake fcm

File size: 2.2 KB
Line 
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# ------------------------------------------------------------------------------
19use strict;
20use warnings;
21# ------------------------------------------------------------------------------
22package FCM::System::Make::Build::Task::Link::CXX;
23use base qw{FCM::System::Make::Build::Task::Link};
24
25use FCM::System::Make::Build::Task::Compile::CXX;
26
27our %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
39sub 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# ------------------------------------------------------------------------------
501;
51__END__
52
53=head1 NAME
54
55FCM::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
65Wraps L<FCM::System::Make::Build::Task::Link> to link a C++ object into an
66executable.
67
68=head1 COPYRIGHT
69
70Copyright (C) 2006-2021 British Crown (Met Office) & Contributors.
71
72=cut
Note: See TracBrowser for help on using the repository browser.