fixes a small issue with clang
authorsgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Jul 2012 13:53:04 +0000 (13:53 +0000)
committersgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Jul 2012 13:53:04 +0000 (13:53 +0000)
Vc/cmake/CheckCCompilerFlag.cmake
Vc/cmake/CheckCXXCompilerFlag.cmake
Vc/cmake/VcMacros.cmake

index 3c904dd..6ffd017 100644 (file)
@@ -28,6 +28,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
    SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
    CHECK_C_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
      # Some compilers do not fail with a bad flag
+     FAIL_REGEX "error: bad value (.*) for .* switch"       # GNU
      FAIL_REGEX "argument unused during compilation"        # clang
      FAIL_REGEX "is valid for .* but not for C"             # GNU
      FAIL_REGEX "unrecognized .*option"                     # GNU
index fccc97b..667bf34 100644 (file)
@@ -28,6 +28,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
    SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
    CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
      # Some compilers do not fail with a bad flag
+     FAIL_REGEX "error: bad value (.*) for .* switch"       # GNU
      FAIL_REGEX "argument unused during compilation"        # clang
      FAIL_REGEX "is valid for .* but not for C\\\\+\\\\+"   # GNU
      FAIL_REGEX "unrecognized .*option"                     # GNU
index 7f247b3..2e3a267 100644 (file)
@@ -31,10 +31,10 @@ macro(vc_determine_compiler)
          set(Vc_COMPILER_IS_INTEL true)
          exec_program(${CMAKE_C_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_ICC_VERSION)
          message(STATUS "Detected Compiler: Intel ${Vc_ICC_VERSION}")
-      elseif(CMAKE_CXX_COMPILER MATCHES "/(opencc|openCC)$")
+      elseif(CMAKE_CXX_COMPILER MATCHES "(opencc|openCC)$")
          set(Vc_COMPILER_IS_OPEN64 true)
          message(STATUS "Detected Compiler: Open64")
-      elseif(CMAKE_CXX_COMPILER MATCHES "/clang\\+\\+$")
+      elseif(CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$")
          set(Vc_COMPILER_IS_CLANG true)
          message(STATUS "Detected Compiler: Clang")
       elseif(MSVC)