mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
SwiftMix: properly export SwiftMain method
This commit is contained in:
1 parent
cab5471a7b
commit
b7b66919a3
2 files changed
+2
-1
No files matched your search
@@ -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>")
|
||||
@@ -1,7 +1,7 @@
|
||||
import Foundation
|
||||
|
||||
@objc class SwiftMainClass : NSObject {
|
||||
class func SwiftMain() -> Int32 {
|
||||
@objc class func SwiftMain() -> Int32 {
|
||||
dump("Hello World!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user