소스 검색

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.
Brad King 12 년 전
부모
커밋
765b46d1e1
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      Tests/Architecture/CMakeLists.txt
  2. 2 2
      Tests/BuildDepends/Project/CMakeLists.txt

+ 2 - 2
Tests/Architecture/CMakeLists.txt

@@ -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()

+ 2 - 2
Tests/BuildDepends/Project/CMakeLists.txt

@@ -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()