Iproved regex in cmake script for os x support
parent
f9f7f6b182
commit
eb7ab62cf3
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue