Test compiler arguments for the appropriate compiler

MSVC does not expose GCC-compatible compiler arguments, so there's no
point in even trying.
macos/v1.5.9
Emmanuele Bassi 8 years ago
parent d35870f3b6
commit 37eaaada97
  1. 9
      meson.build

@ -73,7 +73,8 @@ endif
conf.set10('ENABLE_GLX', build_glx)
# Compiler flags, taken from the Xorg macros
test_cflags = [
if cc.get_id() != 'msvc'
test_cflags = [
'-Wpointer-arith',
'-Wmissing-declarations',
'-Wformat=2',
@ -105,7 +106,11 @@ test_cflags = [
'-Werror=pointer-to-int-cast',
'-fno-strict-aliasing',
'-Wno-int-conversion',
]
]
else
test_cflags = []
endif
common_cflags = []
foreach cflag: test_cflags
if cc.has_argument(cflag)

Loading…
Cancel
Save