|
|
|
@ -51,7 +51,7 @@ lib_suffixes = ('a', 'lib', 'dll', 'dll.a', 'dylib', 'so') # type: T.Tuple[str, |
|
|
|
|
# This means we can't include .h headers here since they could be C, C++, ObjC, etc. |
|
|
|
|
lang_suffixes = { |
|
|
|
|
'c': ('c',), |
|
|
|
|
'cpp': ('cpp', 'cc', 'cxx', 'c++', 'hh', 'hpp', 'ipp', 'hxx', 'ino', 'ixx'), |
|
|
|
|
'cpp': ('cpp', 'cc', 'cxx', 'c++', 'hh', 'hpp', 'ipp', 'hxx', 'ino', 'ixx', 'C'), |
|
|
|
|
'cuda': ('cu',), |
|
|
|
|
# f90, f95, f03, f08 are for free-form fortran ('f90' recommended) |
|
|
|
|
# f, for, ftn, fpp are for fixed-form fortran ('f' or 'for' recommended) |
|
|
|
@ -510,7 +510,9 @@ class Compiler(metaclass=abc.ABCMeta): |
|
|
|
|
def can_compile(self, src: 'mesonlib.FileOrString') -> bool: |
|
|
|
|
if isinstance(src, mesonlib.File): |
|
|
|
|
src = src.fname |
|
|
|
|
suffix = os.path.splitext(src)[1].lower() |
|
|
|
|
suffix = os.path.splitext(src)[1] |
|
|
|
|
if suffix != '.C': |
|
|
|
|
suffix = suffix.lower() |
|
|
|
|
return bool(suffix) and suffix[1:] in self.can_compile_suffixes |
|
|
|
|
|
|
|
|
|
def get_id(self) -> str: |
|
|
|
|