https://github.com/Kitware/CMake
Raw File
Tip revision: 6c71fa6d56d3e2de30de3e0eb1d72375530598c4 authored by Brad King on 14 March 2023, 14:04:14 UTC
CMake 3.26.0
Tip revision: 6c71fa6
SwiftMain.swift
import Foundation

@objc class SwiftMainClass : NSObject {
  @objc class func SwiftMain() -> Int32 {
    dump("Hello World!");
#if FOO
    dump("FOO defined");
#else
    fatalError("FOO not defined");
#endif
#if BAR
    dump("BAR defined");
#else
    fatalError("BAR not defined");
#endif
#if CCOND
    fatalError("CCOND defined");
#else
    dump("CCOND not defined");
#endif
#if SWIFTCOND
    dump("SWIFTCOND defined");
#else
    fatalError("SWIFTCOND not defined");
#endif
    return 0;
  }
}
back to top