source: LMDZ6/branches/Amaury_dev/tools/fcm/lib/FCM/System/Make/Build/Task/Preprocess/Fortran.pm @ 5095

Last change on this file since 5095 was 5095, checked in by abarral, 2 months ago

Revert cosp*/ from the trunk, as it's external code
Add missing bits from FCM2 source

File size: 2.1 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::Preprocess::Fortran;
23use base qw{FCM::System::Make::Build::Task::Preprocess};
24
25our %PROP_OF = (
26    'fpp'               => 'cpp',
27    'fpp.defs'          => '',
28    'fpp.flags'         => '-P -traditional',
29    'fpp.flag-define'   => '-D%s',
30    'fpp.flag-include'  => '-I%s',
31    'fpp.include-paths' => '',
32);
33
34sub new {
35    my ($class, $attrib_ref) = @_;
36    bless(
37        $class->SUPER::new(
38            {name => 'fpp', prop_of => {%PROP_OF}, %{$attrib_ref}},
39        ),
40        $class,
41    );
42}
43
44# ------------------------------------------------------------------------------
451;
46__END__
47
48=head1 NAME
49
50FCM::System::Make::Build::Task::Preprocess::Fortran
51
52=head1 SYNOPSIS
53
54    use FCM::System::Make::Build::Task::Preprocess::Fortran;
55    my $task = FCM::System::Make::Build::Task::Preprocess::Fortran->new(\%attrib);
56    $task->main($target);
57
58=head1 DESCRIPTION
59
60Wraps L<FCM::System::Make::Build::Task::Preprocess> to preprocess a Fortran
61source.
62
63=head1 COPYRIGHT
64
65Copyright (C) 2006-2021 British Crown (Met Office) & Contributors.
66
67=cut
Note: See TracBrowser for help on using the repository browser.