[gobject-introspection] dumper.py: Fix for Visual C++ usage
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] dumper.py: Fix for Visual C++ usage
- Date: Fri, 22 Feb 2013 09:42:29 +0000 (UTC)
commit 1513b683d7f897e825ae4704544fbe0c72bb611a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Feb 22 16:35:41 2013 +0800
dumper.py: Fix for Visual C++ usage
-Wno-deprecated-declarations is a compilation flag that causes builds of
introspection files to fail on Visual C++ builds, so use -wd4996 instead
when we are using Visual C++, which serves the same purpose of
-Wno-deprecated-declarations with Visual C++.
giscanner/dumper.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index dd1813f..d95ea6b 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -206,7 +206,12 @@ class DumpCompiler(object):
# header of the library being introspected
if self._compiler_cmd == 'gcc' and not self._options.init_sections:
args.append('-Wall')
- args.append("-Wno-deprecated-declarations")
+ # The Microsoft compiler uses different option flags for
+ # silencing warnings on deprecated function usage
+ if self._pkgconfig_msvc_flags:
+ args.append("-wd4996")
+ else:
+ args.append("-Wno-deprecated-declarations")
pkgconfig_flags = self._run_pkgconfig('--cflags')
args.extend(pkgconfig_flags)
cflags = os.environ.get('CFLAGS', '')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]