]> git.kaiwu.me - nginx.git/commitdiff
Win32: handling of localized MSVC cl output.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Feb 2023 15:15:57 +0000 (18:15 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Feb 2023 15:15:57 +0000 (18:15 +0300)
Output examples in English, Russian, and Spanish:

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Оптимизирующий 32-разрядный компилятор Microsoft (R) C/C++ версии 16.00.30319.01 для 80x86
Compilador de optimización de C/C++ de Microsoft (R) versión 16.00.30319.01 para x64

Since most of the words are translated, instead of looking for the words
"Compiler Version" we now search for "C/C++" and the version number.

auto/cc/msvc

index 68435ff48a78b88aab289fec315e0d6dec949be6..d4c0be4c3f272da2caf2617fa0bab6f712d586a6 100644 (file)
@@ -11,8 +11,8 @@
 # MSVC 2015 (14.0)                        cl 19.00
 
 
-NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'Compiler Version' 2>&1 \
-                                 | sed -e 's/^.* Version \(.*\)/\1/'`
+NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'C/C++.* [0-9][0-9]*\.[0-9]' 2>&1 \
+                                 | sed -e 's/^.* \([0-9][0-9]*\.[0-9].*\)/\1/'`
 
 echo " + cl version: $NGX_MSVC_VER"