Fix the version extraction regex for clang.

This commit is contained in:
Stephen Kelly 2011-08-17 13:32:48 +02:00
parent a493d1a353
commit aa4f0b6ba8
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ endif()
if(CMAKE_CXX_COMPILER_ID MATCHES Clang) if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE _clang_version_info) exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE _clang_version_info)
string (REGEX MATCH "version [345]\\.[0-9]" _clang_version "${_clang_version_info}") string (REGEX REPLACE ".*version ([0-9]\\.[0-9]).*" "\\1" _clang_version "${_clang_version_info}")
endif() endif()
message("Platform:\n WIN32: ${WIN32}\n UNIX: ${UNIX}\n APPLE: ${APPLE}\n MINGW: ${MINGW}\n CYGWIN: ${CYGWIN}\n" message("Platform:\n WIN32: ${WIN32}\n UNIX: ${UNIX}\n APPLE: ${APPLE}\n MINGW: ${MINGW}\n CYGWIN: ${CYGWIN}\n"