diff options
| author | Gregor Jasny <gjasny@googlemail.com> | 2019-05-01 13:24:34 +0200 |
|---|---|---|
| committer | Gregor Jasny <gjasny@googlemail.com> | 2019-05-01 13:30:14 +0200 |
| commit | b7b66919a3952a3a2c31d659fcbe3bebf7e5887e (patch) | |
| tree | bcf0a5091190eeb9e24518a10bdb2129cdee5282 /Tests/SwiftMix | |
| parent | cab5471a7ba0f45273f293104f5d00d1af8284ac (diff) | |
| download | cmake-b7b66919a3952a3a2c31d659fcbe3bebf7e5887e.tar.gz | |
SwiftMix: properly export SwiftMain method
Diffstat (limited to 'Tests/SwiftMix')
| -rw-r--r-- | Tests/SwiftMix/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | Tests/SwiftMix/SwiftMain.swift | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Tests/SwiftMix/CMakeLists.txt b/Tests/SwiftMix/CMakeLists.txt index 5e50470f66..6d8e48bd06 100644 --- a/Tests/SwiftMix/CMakeLists.txt +++ b/Tests/SwiftMix/CMakeLists.txt @@ -3,3 +3,4 @@ project(SwiftMix C Swift) add_executable(SwiftMix CMain.c ObjCMain.m SwiftMain.swift ObjC-Swift.h) set_property(TARGET SwiftMix PROPERTY XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER "ObjC-Swift.h") +target_compile_options(SwiftMix PRIVATE "$<$<COMPILE_LANGUAGE:C>:-Werror=objc-method-access>") diff --git a/Tests/SwiftMix/SwiftMain.swift b/Tests/SwiftMix/SwiftMain.swift index a4a0a62b43..d9c8cd7564 100644 --- a/Tests/SwiftMix/SwiftMain.swift +++ b/Tests/SwiftMix/SwiftMain.swift @@ -1,7 +1,7 @@ import Foundation @objc class SwiftMainClass : NSObject { - class func SwiftMain() -> Int32 { + @objc class func SwiftMain() -> Int32 { dump("Hello World!"); return 0; } |
