[libhandy/msvc: 20/26] meson.build: Force-include msvc_recommended_pragmas.h
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/msvc: 20/26] meson.build: Force-include msvc_recommended_pragmas.h
- Date: Fri, 21 Jan 2022 09:51:35 +0000 (UTC)
commit 4886720168de3507100f4965b7e53d7c7c82e8ae
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jan 19 12:26:31 2022 +0800
meson.build: Force-include msvc_recommended_pragmas.h
...on Visual Studio builds, as Visual Studio use a different way to look out
or ignore the warnings that we want to look out or ignore.
meson.build | 76 ++++++++++++++++++++++++++++++++-----------------------------
1 file changed, 40 insertions(+), 36 deletions(-)
---
diff --git a/meson.build b/meson.build
index 9c1438f3..ea9fcb98 100644
--- a/meson.build
+++ b/meson.build
@@ -41,42 +41,46 @@ src_inc = include_directories('src')
cc = meson.get_compiler('c')
global_c_args = []
-test_c_args = [
- '-Wcast-align',
- '-Wdate-time',
- '-Wdeclaration-after-statement',
- ['-Werror=format-security', '-Werror=format=2'],
- '-Wendif-labels',
- '-Werror=incompatible-pointer-types',
- '-Werror=missing-declarations',
- '-Werror=overflow',
- '-Werror=return-type',
- '-Werror=shift-count-overflow',
- '-Werror=shift-overflow=2',
- '-Werror=implicit-fallthrough=3',
- '-Wformat-nonliteral',
- '-Wformat-security',
- '-Winit-self',
- '-Wmaybe-uninitialized',
- '-Wmissing-field-initializers',
- '-Wmissing-include-dirs',
- '-Wmissing-noreturn',
- '-Wnested-externs',
- '-Wno-missing-field-initializers',
- '-Wno-sign-compare',
- '-Wno-strict-aliasing',
- '-Wno-unused-parameter',
- '-Wold-style-definition',
- '-Wpointer-arith',
- '-Wredundant-decls',
- '-Wshadow',
- '-Wstrict-prototypes',
- '-Wswitch-default',
- '-Wswitch-enum',
- '-Wtype-limits',
- '-Wundef',
- '-Wunused-function',
-]
+if cc.get_id() == 'msvc'
+ test_c_args = [ '-FImsvc_recommended_pragmas.h' ]
+else
+ test_c_args = [
+ '-Wcast-align',
+ '-Wdate-time',
+ '-Wdeclaration-after-statement',
+ ['-Werror=format-security', '-Werror=format=2'],
+ '-Wendif-labels',
+ '-Werror=incompatible-pointer-types',
+ '-Werror=missing-declarations',
+ '-Werror=overflow',
+ '-Werror=return-type',
+ '-Werror=shift-count-overflow',
+ '-Werror=shift-overflow=2',
+ '-Werror=implicit-fallthrough=3',
+ '-Wformat-nonliteral',
+ '-Wformat-security',
+ '-Winit-self',
+ '-Wmaybe-uninitialized',
+ '-Wmissing-field-initializers',
+ '-Wmissing-include-dirs',
+ '-Wmissing-noreturn',
+ '-Wnested-externs',
+ '-Wno-missing-field-initializers',
+ '-Wno-sign-compare',
+ '-Wno-strict-aliasing',
+ '-Wno-unused-parameter',
+ '-Wold-style-definition',
+ '-Wpointer-arith',
+ '-Wredundant-decls',
+ '-Wshadow',
+ '-Wstrict-prototypes',
+ '-Wswitch-default',
+ '-Wswitch-enum',
+ '-Wtype-limits',
+ '-Wundef',
+ '-Wunused-function',
+ ]
+endif
target_system = target_machine.system()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]