[llvm] r279153 - [CMake] Minor fix to regex in r279152
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 14:36:36 PDT 2016
Author: cbieneman
Date: Thu Aug 18 16:36:36 2016
New Revision: 279153
URL: http://llvm.org/viewvc/llvm-project?rev=279153&view=rev
Log:
[CMake] Minor fix to regex in r279152
The third version component is optional in Xcode's version spew, so we need to make it optional in the regex.
Modified:
llvm/trunk/tools/xcode-toolchain/CMakeLists.txt
Modified: llvm/trunk/tools/xcode-toolchain/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/xcode-toolchain/CMakeLists.txt?rev=279153&r1=279152&r2=279153&view=diff
==============================================================================
--- llvm/trunk/tools/xcode-toolchain/CMakeLists.txt (original)
+++ llvm/trunk/tools/xcode-toolchain/CMakeLists.txt Thu Aug 18 16:36:36 2016
@@ -49,7 +49,7 @@ if(NOT XCODE_VERSION)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_FILE /dev/null
)
- string(REGEX MATCH "Xcode ([0-9][.][0-9][.][0-9])" version_match ${xcodebuild_version})
+ string(REGEX MATCH "Xcode ([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})
More information about the llvm-commits
mailing list