File tree Expand file tree Collapse file tree 9 files changed +49
-30
lines changed
Expand file tree Collapse file tree 9 files changed +49
-30
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,14 @@ let openRenderBoxShimsTarget = Target.target(
7575 name: " OpenRenderBoxShims " ,
7676 swiftSettings: sharedSwiftSettings
7777)
78- let openRenderBoxTestTarget = Target . testTarget (
79- name: " OpenRenderBoxTests " ,
78+ let openRenderBoxCxxTestTarget = Target . testTarget (
79+ name: " OpenRenderBoxCxxTests " ,
8080 dependencies: [
8181 " OpenRenderBox " ,
8282 ] ,
8383 exclude: [ " README.md " ] ,
84- swiftSettings: sharedSwiftSettings
84+ cSettings: sharedCSettings + [ . define( " SWIFT_TESTING " ) ] ,
85+ swiftSettings: sharedSwiftSettings + [ . interoperabilityMode( . Cxx) ]
8586)
8687let openRenderBoxCompatibilityTestTarget = Target . testTarget (
8788 name: " OpenRenderBoxCompatibilityTests " ,
@@ -117,7 +118,7 @@ let package = Package(
117118 openRenderBoxTarget,
118119 openRenderBoxShimsTarget,
119120
120- openRenderBoxTestTarget ,
121+ openRenderBoxCxxTestTarget ,
121122 openRenderBoxCompatibilityTestTarget,
122123 ] ,
123124 cxxLanguageStandard: . cxx20
Original file line number Diff line number Diff line change 44
55#include < OpenRenderBox/ORBUUID.h>
66
7- #if ORB_TARGET_OS_DARWIN
7+ #if ORB_TARGET_OS_DARWIN && __OBJC__
88ORBUUID ORBUUIDInitFromNSUUID (NSUUID *uuid) {
99 ORBUUID ob_uuid;
1010 [uuid getUUIDBytes: ob_uuid.bytes];
Original file line number Diff line number Diff line change 66
77#include "ORBBase.h"
88
9- #if ORB_TARGET_OS_DARWIN
9+ #if ORB_TARGET_OS_DARWIN && __OBJC__
1010#include <Foundation/Foundation.h>
1111#endif
1212
@@ -16,7 +16,7 @@ typedef struct ORBUUID {
1616
1717ORB_EXTERN_C_BEGIN
1818
19- #if ORB_TARGET_OS_DARWIN
19+ #if ORB_TARGET_OS_DARWIN && __OBJC__
2020ORB_EXPORT
2121ORB_REFINED_FOR_SWIFT
2222ORBUUID ORBUUIDInitFromNSUUID (NSUUID * uuid ) ORB_SWIFT_NAME (ORBUUID .init (uuid :));
Original file line number Diff line number Diff line change 1010
1111#include < os/log.h>
1212
13+ ORB_ASSUME_NONNULL_BEGIN
14+
1315namespace ORB {
1416os_log_t misc_log ();
1517os_log_t error_log ();
1618} /* ORB */
1719
20+ ORB_ASSUME_NONNULL_END
21+
1822#endif /* ORB_TARGET_OS_DARWIN */
1923
Original file line number Diff line number Diff line change @@ -2,3 +2,20 @@ module OpenRenderBox {
22 umbrella header "OpenRenderBox/OpenRenderBox-umbrella.h"
33 export *
44}
5+
6+ module OpenRenderBoxCxx {
7+ requires cplusplus
8+ export *
9+ }
10+
11+ module OpenRenderBoxCxx.Path {
12+ requires cplusplus
13+ umbrella "OpenRenderBoxCxx/Path"
14+ export *
15+ }
16+
17+ module OpenRenderBoxCxx.Util {
18+ requires cplusplus
19+ umbrella "OpenRenderBoxCxx/Util"
20+ export *
21+ }
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ //
2+ // LogTests.swift
3+ // OpenRenderBox
4+ //
5+ // Created by Kyle on 2025/9/8.
6+ //
7+
8+ #if canImport(Darwin)
9+ import OpenRenderBoxCxx. Util
10+ import Testing
11+
12+ @Suite
13+ struct LogTests {
14+ @Test
15+ func table( ) {
16+ _ = ORB . misc_log ( )
17+ _ = ORB . error_log ( )
18+ }
19+ }
20+ #endif
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments