You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CppInteroperability/GettingStartedWithC++Interop.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ module CxxTest {
32
32
Add the C++ module to the include path and enable C++ interop:
33
33
- Navigate to your project directory
34
34
- In `Project` navigate to `Build Settings` -> `Swift Compiler`
35
-
- Under `Custom Flags` -> `Other Swift Flags` add `-cxx-compatibility-mode=swift-5.7`
35
+
- Under `Custom Flags` -> `Other Swift Flags` add `-cxx-compatibility-mode=swift-5.9`
36
36
- Under `Search Paths` -> `Import Paths` add your search path to the C++ module (i.e, `./ProjectName/CxxTest`).
37
37
38
38
- This should now allow your to import your C++ Module into any `.swift` file.
@@ -81,7 +81,7 @@ After creating your Swift package project, follow the steps [Creating a Module t
81
81
- Swift code will be in `Sources/CxxInterop` called `main.swift`
82
82
- C++ source code follows the example shown in [Creating a Module to contain your C++ source code](#creating-a-module-to-contain-your-c-source-code)
83
83
- Under targets, add the name of your C++ module and the directory containing the Swift code as a target.
84
-
- In the target defining your Swift target, add a`dependencies` to the C++ Module, the `path`, `source`, and `swiftSettings` with `unsafeFlags` with the source to the C++ Module, and enable `-cxx-interoperability-mode=swift-5.7`
84
+
- In the target defining your Swift target, add a`dependencies` to the C++ Module, the `path`, `source`, and `swiftSettings` with `unsafeFlags` with the source to the C++ Module, and enable `-cxx-interoperability-mode=swift-5.9`
85
85
86
86
```
87
87
//In Package Manifest
@@ -111,7 +111,7 @@ let package = Package(
111
111
sources: [ "main.swift" ],
112
112
swiftSettings: [.unsafeFlags([
113
113
"-I", "Sources/CxxTest",
114
-
"-cxx-interoperability-mode=swift-5.7",
114
+
"-cxx-interoperability-mode=swift-5.9",
115
115
])]
116
116
),
117
117
]
@@ -144,7 +144,7 @@ After creating your project follow the steps [Creating a Module to contain your
144
144
- Create a `CMakeLists.txt` file and configure for your project
145
145
- In`add_library` invoke `cxx-support` with the path to the C++ implementation file
146
146
- Add the `target_include_directories` with `cxx-support` and path to the C++ Module `${CMAKE_SOURCE_DIR}/Sources/CxxTest`
147
-
- Add the `add_executable` to the specific files/directory you would like to generate source, with`SHELL:-cxx-interoperability-mode=swift-5.7`.
147
+
- Add the `add_executable` to the specific files/directory you would like to generate source, with`SHELL:-cxx-interoperability-mode=swift-5.9`.
148
148
- In the example below we will be following the file structure used in [Creating a Swift Package](#Creating-a-Swift-Package)
149
149
150
150
```
@@ -167,7 +167,7 @@ target_include_directories(cxx-support PUBLIC
0 commit comments