summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-08-22 17:20:46 -0400
committerColin Walters <walters@verbum.org>2013-08-22 17:32:41 -0400
commit6697c86548f809bd65d3a5f736ac060ced7ccc6c (patch)
treed386927d0489d9cfbbebd688eaeea26c63751c02
parent85d02d59f101f9eb37829b16a81890ef9801824a (diff)
downloadgobject-introspection-6697c86548f809bd65d3a5f736ac060ced7ccc6c.tar.gz
dumper: Attempt to identify MSVC/'cl' more precisely
Checking for 'cl' in the whole compiler string trips up people who do CC='gcc --command-with-cl-in-the-name'. We should (probably) only look at the first argument, although this will break for people doing CC='ccache cl', but would someone do that? See: https://bugzilla.gnome.org/show_bug.cgi?id=698090
-rw-r--r--giscanner/dumper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index 157b24da..98920e36 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -89,9 +89,9 @@ class DumpCompiler(object):
# Enable the --msvc-syntax pkg-config flag when
# the Microsoft compiler is used
# (This is the other way to check whether Visual C++ is used subsequently)
- if 'clang' not in self._compiler_cmd:
- if 'cl' in self._compiler_cmd:
- self._pkgconfig_msvc_flags = '--msvc-syntax'
+ args = self._compiler_cmd.split()
+ if 'cl.exe' in args or 'cl' in args:
+ self._pkgconfig_msvc_flags = '--msvc-syntax'
self._uninst_srcdir = os.environ.get(
'UNINSTALLED_INTROSPECTION_SRCDIR')
self._packages = ['gio-2.0 gmodule-2.0']