meson: Support any compiler with gcc or msvc argument syntax
This includes e.g. clang-cl.
This commit is contained in:
parent
ff037052bc
commit
ce182817b4
|
@ -31,12 +31,10 @@ fc_sources = [
|
||||||
|
|
||||||
# FIXME: obviously fragile, cc.preprocess would be sweet
|
# FIXME: obviously fragile, cc.preprocess would be sweet
|
||||||
cpp = cc.cmd_array()
|
cpp = cc.cmd_array()
|
||||||
if cc.get_id() == 'gcc'
|
if cc.get_argument_syntax() == 'gcc'
|
||||||
cpp += ['-E', '-P']
|
cpp += ['-E', '-P']
|
||||||
elif cc.get_id() == 'msvc'
|
elif cc.get_argument_syntax() == 'msvc'
|
||||||
cpp += ['/EP']
|
cpp += ['/EP']
|
||||||
elif cc.get_id() == 'clang'
|
|
||||||
cpp += ['-E', '-P']
|
|
||||||
else
|
else
|
||||||
error('FIXME: implement cc.preprocess')
|
error('FIXME: implement cc.preprocess')
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue