Iproved regex in cmake script for os x support

0.8
Bruno Van de Velde 2014-10-22 12:50:50 +02:00
parent f9f7f6b182
commit eb7ab62cf3
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.)
EXEC_PROGRAM(/usr/bin/sw_vers ARGS -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW)
STRING(REGEX REPLACE "10\\.([0-9])|(10).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")
STRING(REGEX REPLACE "10\\.([0-9]+).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")
if(${MACOSX_VERSION} LESS 5)
message(FATAL_ERROR "Unsupported version of OS X : ${MACOSX_VERSION_RAW}")
return()