From 5dc174cf3bf758e9b69620e90ca463dc6bfaaf44 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 28 Jun 2018 00:39:09 +0000 Subject: [PATCH] [cmake][xcode-toolchain] add support for major Xcode version >= 10 The regex that extracts the Xcode version should support major versions with two digits. rdar://41465184 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335801 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/xcode-toolchain/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xcode-toolchain/CMakeLists.txt b/tools/xcode-toolchain/CMakeLists.txt index d433c52febf..0ae5e374fe9 100644 --- a/tools/xcode-toolchain/CMakeLists.txt +++ b/tools/xcode-toolchain/CMakeLists.txt @@ -49,7 +49,7 @@ if(NOT XCODE_VERSION) OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_FILE /dev/null ) - string(REGEX MATCH "Xcode ([0-9]([.][0-9])+)" version_match ${xcodebuild_version}) + string(REGEX MATCH "Xcode ([0-9][0-9]?([.][0-9])+)" version_match ${xcodebuild_version}) if(version_match) message(STATUS "Identified Xcode Version: ${CMAKE_MATCH_1}") set(XCODE_VERSION ${CMAKE_MATCH_1}) -- 2.11.0