New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
C.pm in vendors/lib/FCM/System/Make/Build/Task/Compile – NEMO

source: vendors/lib/FCM/System/Make/Build/Task/Compile/C.pm @ 10669

Last change on this file since 10669 was 10669, checked in by nicolasmartin, 5 years ago

Import latest FCM release from Github into the repository for testing

File size: 2.1 KB
Line 
1# ------------------------------------------------------------------------------
2# (C) British Crown Copyright 2006-17 Met Office.
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::Compile::C;
23use base qw{FCM::System::Make::Build::Task::Compile};
24
25our %PROP_OF = (
26    'cc'               => 'gcc',
27    'cc.defs'          => '',
28    'cc.flags'         => '',
29    'cc.flag-compile'  => '-c',
30    'cc.flag-define'   => '-D%s',
31    'cc.flag-include'  => '-I%s',
32    'cc.flag-omp'      => '',
33    'cc.flag-output'   => '-o%s',
34    'cc.include-paths' => '',
35);
36
37sub new {
38    my ($class, $attrib_ref) = @_;
39    bless(
40        $class->SUPER::new(
41            {name => 'cc', prop_of => sub {return {%PROP_OF}}, %{$attrib_ref}},
42        ),
43        $class,
44    );
45}
46
47# ------------------------------------------------------------------------------
481;
49__END__
50
51=head1 NAME
52
53FCM::System::Make::Build::Task::Compile::C
54
55=head1 SYNOPSIS
56
57    use FCM::System::Make::Build::Task::Compile::C;
58    my $task = FCM::System::Make::Build::Task::Compile::C->new(\%attrib);
59    $task->main($target);
60
61=head1 DESCRIPTION
62
63Wraps L<FCM::System::Make::Build::Task::Compile> to compile a C source into an
64object.
65
66=head1 COPYRIGHT
67
68(C) Crown copyright Met Office. All rights reserved.
69
70=cut
Note: See TracBrowser for help on using the repository browser.