[cmake-developers] Adding Swift support to CMake

Gregor Jasny gjasny at googlemail.com
Tue Aug 25 16:30:44 EDT 2015


Hi Eric & Brad,

On 15/07/15 12:16, Eric Wing wrote:
> On 7/7/15, Brad King <brad.king at kitware.com> wrote:
>> On 07/02/2015 07:54 PM, Eric Wing wrote:
>>> Thank you Brad. When you are ready, let me know how I can help next.
>>
>> I have basic support with the Xcode generator done.
>>
>> Please try out this commit:
>>
>>  Add rudimentary support for the Apple Swift language with Xcode
>>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf112531

I was just digging through OSX 10.11 / Xcode 7 errors and noticed that
the Swift tests fail with Xcode7:

https://open.cdash.org/buildSummary.php?buildid=3972344

> CompileSwift normal x86_64 /Users/builder/external/CMake/Tests/SwiftOnly/main.swift
>     cd /Users/builder/external/CMake/Tests/SwiftOnly
>     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/builder/external/CMake/Tests/SwiftOnly/main.swift -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/Debug -F /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/Debug -serialize-debugging-options -Xcc -I/Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/swift-overrides.hmap -Xcc -I/Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/Debug/include -Xcc -I/Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/DerivedSources/x86_64 -Xcc -I/Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/DerivedSources -Xcc "-DCMAKE_INTD
IR=\"Debug\"" -Xcc -working-directory/Users/builder/external/CMake/Tests/SwiftOnly -emit-module-doc-path /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/Objects-normal/x86_64/main~partial.swiftdoc -O -module-name SwiftOnly -emit-module-path /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/Objects-normal/x86_64/main~partial.swiftmodule -serialize-diagnostics-path /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/Objects-normal/x86_64/main.dia -emit-dependencies-path /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/Objects-normal/x86_64/main.d -emit-reference-dependencies-path /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/SwiftOnly.build/Debug/SwiftOnly.build/Objects-normal/x86_64/main.swiftdeps -o /Users/builder/external/CMake-xcode-dbg-x86_64/Tests/SwiftOnly/Swift
Only.build/Debug/SwiftOnly.build/Objects-normal/x86_64/main.o
> /Users/builder/external/CMake/Tests/SwiftOnly/main.swift:1:1: error: 'println' has been renamed to 'print'
> println("SwiftOnly")
> ^~~~~~~
> print
> Swift.println:1:82: note: 'println' has been explicitly marked unavailable here
> @available(*, unavailable) @inline(never) @_semantics("stdlib_binary_only") func println<T>(value: T)

Thanks,
Gregor


More information about the cmake-developers mailing list