summaryrefslogtreecommitdiffstats
path: root/Tests/SwiftMix
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2019-05-01 11:24:34 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2019-05-01 11:30:14 (GMT)
commitb7b66919a3952a3a2c31d659fcbe3bebf7e5887e (patch)
treebcf0a5091190eeb9e24518a10bdb2129cdee5282 /Tests/SwiftMix
parentcab5471a7ba0f45273f293104f5d00d1af8284ac (diff)
downloadCMake-b7b66919a3952a3a2c31d659fcbe3bebf7e5887e.zip
CMake-b7b66919a3952a3a2c31d659fcbe3bebf7e5887e.tar.gz
CMake-b7b66919a3952a3a2c31d659fcbe3bebf7e5887e.tar.bz2
SwiftMix: properly export SwiftMain method
Diffstat (limited to 'Tests/SwiftMix')
-rw-r--r--Tests/SwiftMix/CMakeLists.txt1
-rw-r--r--Tests/SwiftMix/SwiftMain.swift2
2 files changed, 2 insertions, 1 deletions
diff --git a/Tests/SwiftMix/CMakeLists.txt b/Tests/SwiftMix/CMakeLists.txt
index 5e50470..6d8e48b 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 a4a0a62..d9c8cd7 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;
}