[gobject-introspection/fix-c4098-warnings] build: Defer check for msvc_recommended_pragmas.h
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/fix-c4098-warnings] build: Defer check for msvc_recommended_pragmas.h
- Date: Thu, 10 Mar 2022 10:28:53 +0000 (UTC)
commit 469c46f20b6a2a63ff43527a8346accb89a19a1c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Mar 10 18:27:07 2022 +0800
build: Defer check for msvc_recommended_pragmas.h
This attempts to ensure that even if we are building GLib as a subproject, we
can force-include msvc_recommended_pragmas.h on Visual Studio builds so that
we can catch compiler warnings that we want to watch out for during the build.
meson.build | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7a7704b1..d0ea44ea 100644
--- a/meson.build
+++ b/meson.build
@@ -65,10 +65,7 @@ if cc.get_id() != 'msvc'
'-fno-strict-aliasing',
]
else
- project_c_args += [
- '-FImsvc_recommended_pragmas.h',
- '-utf-8',
- ]
+ project_c_args += [ '-utf-8' ]
endif
project_c_args = cc.get_supported_arguments(project_c_args)
@@ -136,6 +133,14 @@ gio_dep = dependency('gio-2.0', version : glib_version,
fallback: ['glib', 'libgio_dep'])
gmodule_dep = dependency('gmodule-2.0', version : glib_version,
fallback: ['glib', 'libgmodule_dep'])
+
+# Ensure we are able to force-include msvc_recommended_pragmas.h on MSVC
+if cc.get_id() == 'msvc'
+ add_project_arguments(
+ cc.get_supported_arguments('-FImsvc_recommended_pragmas.h'),
+ language: 'c'
+ )
+endif
if host_system != 'windows'
giounix_dep = dependency('gio-unix-2.0', version : glib_version,
fallback: ['glib', 'libgiounix_dep'])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]