diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-12-31 00:48:34 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-04 00:41:56 +0530 |
commit | 2589009d236442dfbaa7573343329baf5b1c3dd1 (patch) | |
tree | 2b973b90d1d44845df2516f927a693047dc7ed5c /mesonbuild/compilers.py | |
parent | 6e5c87e3803ae49c694d4663616365ab193a45c2 (diff) | |
download | meson-2589009d236442dfbaa7573343329baf5b1c3dd1.zip meson-2589009d236442dfbaa7573343329baf5b1c3dd1.tar.gz meson-2589009d236442dfbaa7573343329baf5b1c3dd1.tar.bz2 |
ifort: Derive from IntelCompiler base class
And fix the list of supported file suffixes, and use .f90 for all
fortran tests since ifort, the Intel Fortran compiler ignores files
ending with .f95, .f03, and .f08
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index b36f285..8212d01 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -33,7 +33,9 @@ lib_suffixes = ('a', 'lib', 'dll', 'dylib', 'so') lang_suffixes = { 'c': ('c',), 'cpp': ('cpp', 'cc', 'cxx', 'c++', 'hh', 'hpp', 'ipp', 'hxx'), - 'fortran': ('f', 'f90', 'f95'), + # f90, f95, f03, f08 are for free-form fortran ('f90' recommended) + # f, for, ftn, fpp are for fixed-form fortran ('f' or 'for' recommended) + 'fortran': ('f90', 'f95', 'f03', 'f08', 'f', 'for', 'ftn', 'fpp'), 'd': ('d', 'di'), 'objc': ('m',), 'objcpp': ('mm',), @@ -2704,12 +2706,15 @@ class SunFortranCompiler(FortranCompiler): def get_module_outdir_args(self, path): return ['-moddir=' + path] -class IntelFortranCompiler(FortranCompiler): +class IntelFortranCompiler(IntelCompiler, FortranCompiler): std_warn_args = ['-warn', 'all'] def __init__(self, exelist, version, is_cross, exe_wrapper=None): - self.file_suffixes = ('f', 'f90') - super().__init__(exelist, version, is_cross, exe_wrapper=None) + self.file_suffixes = ('f90', 'f', 'for', 'ftn', 'fpp') + FortranCompiler.__init__(self, exelist, version, is_cross, exe_wrapper) + # FIXME: Add support for OS X and Windows in detect_fortran_compiler so + # we are sent the type of compiler + IntelCompiler.__init__(self, ICC_STANDARD) self.id = 'intel' def get_module_outdir_args(self, path): @@ -2771,9 +2776,6 @@ class NAGFortranCompiler(FortranCompiler): def get_module_outdir_args(self, path): return ['-mdir', path] - def get_always_args(self): - return [] - def get_warn_args(self, level): return NAGFortranCompiler.std_warn_args |