diff options
author | Simon Warta <[email protected]> | 2017-07-30 00:31:25 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-07-30 00:31:25 +0200 |
commit | 436c1c99adc505d68ebd2674345d3ffc110bf2f6 (patch) | |
tree | fd79803735dc6aa721216358c991fefb8bbd92bd | |
parent | 863908ebf39eea99ef0d0356cb30cbca0fa87b22 (diff) |
Adapt MSVC version regexp to non-english outputs
-rwxr-xr-x | configure.py | 2 | ||||
-rwxr-xr-x | src/scripts/python_uniitests.py | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/configure.py b/configure.py index fe65edcc6..7e3ca1a44 100755 --- a/configure.py +++ b/configure.py @@ -2578,7 +2578,7 @@ class CompilerDetector(object): 'clang': ['-v'], } _version_patterns = { - 'msvc': r'Compiler Version ([0-9]+\.[0-9]+)\.[0-9\.]+ for', + 'msvc': r' ([0-9]+\.[0-9]+)\.[0-9\.]+ ', 'gcc': r'gcc version ([0-9]+\.[0-9]+)\.[0-9]+', 'clang': r'clang version ([0-9]+\.[0-9])[ \.]', } diff --git a/src/scripts/python_uniitests.py b/src/scripts/python_uniitests.py index d116d13b8..4f8bc42b5 100755 --- a/src/scripts/python_uniitests.py +++ b/src/scripts/python_uniitests.py @@ -91,6 +91,15 @@ usage: cl [ option... ] filename... [ /link linkoption... ] """ self.assertEqual(detector.version_from_compiler_output(compiler_out), "2015") + def test_msvc_version_german(self): + detector = CompilerDetector("msvc", "cl.exe", "windows") + compiler_out = """Microsoft (R) C/C++-Optimierungscompiler Version 19.00.24213.1 für x86 +Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten. + +Syntax: cl [ Option... ] Dateiname... [ /link Linkeroption... ] +""" + self.assertEqual(detector.version_from_compiler_output(compiler_out), "2015") + class ModulesChooserResolveDependencies(unittest.TestCase): def test_base(self): |