summaryrefslogtreecommitdiff
path: root/giscanner/dumper.py
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2013-02-22 16:35:41 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2013-02-22 17:42:19 +0800
commit1513b683d7f897e825ae4704544fbe0c72bb611a (patch)
tree945ba7bb5dc42d8bc9d130fae8643e64762e85cb /giscanner/dumper.py
parent0c9036c6c8524bf1cf70af7dc670b569577de0db (diff)
downloadgobject-introspection-1513b683d7f897e825ae4704544fbe0c72bb611a.tar.gz
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++.
Diffstat (limited to 'giscanner/dumper.py')
-rw-r--r--giscanner/dumper.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index dd1813f2..d95ea6ba 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', '')