浏览代码

BUG: Fix compiler flag test for non-English MSVC (#11336)

Approach suggested by John Stark.
Brad King 15 年之前
父节点
当前提交
79e02333a6
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      Modules/CheckCCompilerFlag.cmake
  2. 2 1
      Modules/CheckCXXCompilerFlag.cmake

+ 2 - 1
Modules/CheckCCompilerFlag.cmake

@@ -7,7 +7,7 @@
 # that can modify the build.
 
 #=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2010 Kitware, Inc.
 # Copyright 2006 Alexander Neundorf <[email protected]>
 #
 # Distributed under the OSI-approved BSD License (the "License");
@@ -29,6 +29,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
      # Some compilers do not fail with a bad flag
      FAIL_REGEX "unrecognized .*option"                     # GNU
      FAIL_REGEX "ignoring unknown option"                   # MSVC
+     FAIL_REGEX "warning D9002"                             # MSVC, any lang
      FAIL_REGEX "[Uu]nknown option"                         # HP
      FAIL_REGEX "[Ww]arning: [Oo]ption"                     # SunPro
      FAIL_REGEX "command option .* is not recognized"       # XL

+ 2 - 1
Modules/CheckCXXCompilerFlag.cmake

@@ -7,7 +7,7 @@
 # modify the build.
 
 #=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2010 Kitware, Inc.
 # Copyright 2006 Alexander Neundorf <[email protected]>
 #
 # Distributed under the OSI-approved BSD License (the "License");
@@ -29,6 +29,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
      # Some compilers do not fail with a bad flag
      FAIL_REGEX "unrecognized .*option"                     # GNU
      FAIL_REGEX "ignoring unknown option"                   # MSVC
+     FAIL_REGEX "warning D9002"                             # MSVC, any lang
      FAIL_REGEX "[Uu]nknown option"                         # HP
      FAIL_REGEX "[Ww]arning: [Oo]ption"                     # SunPro
      FAIL_REGEX "command option .* is not recognized"       # XL