diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-12-13 21:02:34 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-12-13 21:02:34 +0200 |
commit | eb2aefd0381647ff1b9d18c6504f6d8f34d581cb (patch) | |
tree | d7ce3bc1a00ae1233fd61aabadec12e504ea8bee | |
parent | da0bd2acf77f2f3f90c03e33b71da9a7f4bc1d37 (diff) | |
download | meson-eb2aefd0381647ff1b9d18c6504f6d8f34d581cb.zip meson-eb2aefd0381647ff1b9d18c6504f6d8f34d581cb.tar.gz meson-eb2aefd0381647ff1b9d18c6504f6d8f34d581cb.tar.bz2 |
Detection works with more vs versions. Closes #332.
-rw-r--r-- | environment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/environment.py b/environment.py index 8db4bd5..e09f6ae 100644 --- a/environment.py +++ b/environment.py @@ -202,7 +202,7 @@ class Environment(): return GnuCCompiler(ccache + [compiler], version, gtype, is_cross, exe_wrap) if 'clang' in out: return ClangCCompiler(ccache + [compiler], version, is_cross, exe_wrap) - if 'Microsoft' in out: + if 'Microsoft' in out or 'Microsoft' in err: # Visual Studio prints version number to stderr but # everything else to stdout. Why? Lord only knows. version = re.search(Environment.version_regex, err).group() @@ -326,7 +326,7 @@ class Environment(): return GnuCPPCompiler(ccache + [compiler], version, gtype, is_cross, exe_wrap) if 'clang' in out: return ClangCPPCompiler(ccache + [compiler], version, is_cross, exe_wrap) - if 'Microsoft' in out: + if 'Microsoft' in out or 'Microsoft' in err: version = re.search(Environment.version_regex, err).group() return VisualStudioCPPCompiler([compiler], version, is_cross, exe_wrap) raise EnvironmentException('Unknown compiler(s) "' + ', '.join(compilers) + '"') |