Xcode: Fix test architecture selection for Xcode >= 5

In Tests/Architecture and Tests/BuildDepends/Project we select a set of
OS X cpu architectures to use for the test.  Prior to Xcode 4 we always
used i386 and ppc.  Starting with Xcode 4, the tools do not support ppc
but do support x86_64, so we switch to that.  Fix the version check to
recognize Xcode >= 5 as at least Xcode 4 and use the new architectures.
This commit is contained in:
Brad King 2013-10-02 10:44:25 -04:00
parent c0133a58e8
commit 765b46d1e1
2 changed files with 4 additions and 4 deletions

View File

@ -7,8 +7,8 @@ function(test_for_xcode4 result_var)
execute_process(COMMAND xcodebuild -version
OUTPUT_VARIABLE ov RESULT_VARIABLE rv
)
if("${rv}" STREQUAL "0")
if(ov MATCHES "^Xcode 4.[0-9].*$")
if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.")
if(NOT CMAKE_MATCH_1 VERSION_LESS 4)
set(${result_var} 1 PARENT_SCOPE)
endif()
endif()

View File

@ -7,8 +7,8 @@ function(test_for_xcode4 result_var)
execute_process(COMMAND xcodebuild -version
OUTPUT_VARIABLE ov RESULT_VARIABLE rv
)
if("${rv}" STREQUAL "0")
if(ov MATCHES "^Xcode 4.[0-9].*$")
if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.")
if(NOT CMAKE_MATCH_1 VERSION_LESS 4)
set(${result_var} 1 PARENT_SCOPE)
endif()
endif()