summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineSwiftCompiler.cmake
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2019-08-30 07:33:37 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2019-08-30 08:53:58 (GMT)
commit5c028c27eb807e22f7d6095da4d9b694487ede05 (patch)
tree17a63faab27e0c4b7963c1f97de7b47bd31d4204 /Modules/CMakeDetermineSwiftCompiler.cmake
parent8720353d4adfa83295d136835f44dce0173efd79 (diff)
downloadCMake-5c028c27eb807e22f7d6095da4d9b694487ede05.zip
CMake-5c028c27eb807e22f7d6095da4d9b694487ede05.tar.gz
CMake-5c028c27eb807e22f7d6095da4d9b694487ede05.tar.bz2
Xcode: Relax swift compiler detection regex for Xcode 11
The Xcode 11 output: ``` CompileSwift normal x86_64 /Users/gregorj/Git/cmake/_build_xcode/Tests/SwiftOnly/CMakeFiles/3.15.20190826-g89479bd/CompilerIdSwift/CompilerId/main.swift (in target 'CompilerIdSwift' from project 'CompilerIdSwift') cd /Users/gregorj/Git/cmake/_build_xcode/Tests/SwiftOnly/CMakeFiles/3.15.20190826-g89479bd/CompilerIdSwift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/gregorj/Git/cmake/_build_xcode/Tests/SwiftOnly/CMakeFiles/3.15.20190826-g89479bd/CompilerIdSwift/CompilerId/main.swift ... ``` The Xcode 10 output: ``` CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler cd /Users/gjasny/src/cmake/Tests/SwiftOnly /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name SwiftOnly -O -enable-batch-mode -enforce-exclusivity=checked -swift-version 5.0 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -target x86_64-apple-macosx10.14 -g -Xfrontend -serialize-debugging-options -swift-version 5 -Xlinker -rpath -Xlinker /usr/lib/swift -I /Users/gjasny/src/cmake/_build_xcode/Tests/SwiftOnly/Debug -F /Users/gjasny/src/cmake/_build_xcode/Tests/SwiftOnly/Debug -c -j24 /Users/gjasny/src/cmake/Tests/SwiftOnly/main.swift ... CompileSwift normal x86_64 /Users/gjasny/src/cmake/Tests/SwiftOnly/main.swift cd /Users/gjasny/src/cmake/Tests/SwiftOnly /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/gjasny/src/cmake/Tests/SwiftOnly/main.swift ... ``` The Xcode 11 output lacks the CompileSwiftSources action but the CompileSwift action is present for both and also look suitable.
Diffstat (limited to 'Modules/CMakeDetermineSwiftCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineSwiftCompiler.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineSwiftCompiler.cmake b/Modules/CMakeDetermineSwiftCompiler.cmake
index 2fcf7b0..9aafe48 100644
--- a/Modules/CMakeDetermineSwiftCompiler.cmake
+++ b/Modules/CMakeDetermineSwiftCompiler.cmake
@@ -53,7 +53,7 @@ if(NOT CMAKE_Swift_COMPILER_ID_RUN)
list(APPEND CMAKE_Swift_COMPILER_ID_MATCH_VENDORS Apple)
set(CMAKE_Swift_COMPILER_ID_MATCH_VENDOR_REGEX_Apple "com.apple.xcode.tools.swift.compiler")
- set(CMAKE_Swift_COMPILER_ID_TOOL_MATCH_REGEX "\nCompileSwiftSources[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]* -c[^\r\n]*CompilerIdSwift/CompilerId/main.swift")
+ set(CMAKE_Swift_COMPILER_ID_TOOL_MATCH_REGEX "\nCompileSwift[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]* -c[^\r\n]*CompilerIdSwift/CompilerId/main.swift")
set(CMAKE_Swift_COMPILER_ID_TOOL_MATCH_INDEX 2)
endif()