default inc dirs: fix warning for unsupporte lang (fixes #6050)

pull/6071/head
Daniel Mensinger 5 years ago committed by Jussi Pakkanen
parent 5478397c59
commit 8b8f14c4dd
  1. 11
      mesonbuild/compilers/mixins/gnu.py

@ -85,8 +85,15 @@ gnu_color_args = {
@functools.lru_cache(maxsize=None)
def gnulike_default_include_dirs(compiler: typing.Tuple[str], lang: str) -> typing.List[str]:
if lang == 'cpp':
lang = 'c++'
lang_map = {
'c': 'c',
'cpp': 'c++',
'objc': 'objective-c',
'objcpp': 'objective-c++'
}
if lang not in lang_map:
return []
lang = lang_map[lang]
env = os.environ.copy()
env["LC_ALL"] = 'C'
cmd = list(compiler) + ['-x{}'.format(lang), '-E', '-v', '-']

Loading…
Cancel
Save