@@ -34,12 +34,12 @@ module Cxx {
34
34
Add the C++ module to the include path and enable C++ interop:
35
35
- Navigate to your project directory
36
36
- In ` Project ` navigate to ` Build Settings ` -> ` Swift Compiler `
37
- - Under ` Custom Flags ` -> ` Other Swift Flags ` add` -Xfrontend - enable-experimental-cxx-interop `
37
+ - Under ` Custom Flags ` -> ` Other Swift Flags ` add` -enable-experimental-cxx-interop `
38
38
- Under ` Search Paths ` -> ` Import Paths ` add your search path to the C++ module (i.e, ` ./ProjectName/Cxx ` ). Repeat this step in ` Other Swift Flags `
39
39
40
40
```
41
41
//Add to Other Swift Flags and Import Paths respectively
42
- -Xfrontend - enable-experimental-cxx-interop
42
+ -enable-experimental-cxx-interop
43
43
-I./ProjectName/Cxx
44
44
```
45
45
@@ -118,7 +118,7 @@ let package = Package(
118
118
sources: [ "main.swift" ],
119
119
swiftSettings: [.unsafeFlags([
120
120
"-I", "Sources/Cxx",
121
- "-Xfrontend", "- enable-experimental-cxx-interop",
121
+ "-enable-experimental-cxx-interop",
122
122
])]
123
123
),
124
124
]
@@ -151,7 +151,7 @@ After creating your project follow the steps [Creating a Module to contain your
151
151
- Create a ` CMakeLists.txt ` file and configure for your project
152
152
- In` add_library ` invoke ` cxx-support ` with the path to the C++ implementation file
153
153
- Add the ` target_include_directories ` with ` cxx-support ` and path to the C++ Module ` ${CMAKE_SOURCE_DIR}/Sources/Cxx `
154
- - Add the ` add_executable ` to the specific files/directory you would like to generate source, with` SHELL:-Xfrontend - enable-experimental-cxx-interop ` .
154
+ - Add the ` add_executable ` to the specific files/directory you would like to generate source, with` SHELL:-enable-experimental-cxx-interop ` .
155
155
- In the example below we will be following the file structure used in [ Creating a Swift Package] ( #Creating-a-Swift-Package )
156
156
157
157
```
@@ -176,7 +176,7 @@ target_include_directories(cxx-support PUBLIC
176
176
177
177
add_executable(CxxInterop ./Sources/CxxInterop/main.swift)
178
178
target_compile_options(CxxInterop PRIVATE
179
- "SHELL:-Xfrontend - enable-experimental-cxx-interop"
179
+ "SHELL:-enable-experimental-cxx-interop"
180
180
target_link_libraries(CxxInterop PRIVATE cxx-support)
181
181
182
182
```
0 commit comments