@@ -34,12 +34,12 @@ module Cxx {
3434Add the C++ module to the include path and enable C++ interop:
3535- Navigate to your project directory
3636- 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 `
3838- Under ` Search Paths ` -> ` Import Paths ` add your search path to the C++ module (i.e, ` ./ProjectName/Cxx ` ). Repeat this step in ` Other Swift Flags `
3939
4040```
4141//Add to Other Swift Flags and Import Paths respectively
42- -Xfrontend - enable-experimental-cxx-interop
42+ -enable-experimental-cxx-interop
4343-I./ProjectName/Cxx
4444```
4545
@@ -118,7 +118,7 @@ let package = Package(
118118 sources: [ "main.swift" ],
119119 swiftSettings: [.unsafeFlags([
120120 "-I", "Sources/Cxx",
121- "-Xfrontend", "- enable-experimental-cxx-interop",
121+ "-enable-experimental-cxx-interop",
122122 ])]
123123 ),
124124 ]
@@ -151,7 +151,7 @@ After creating your project follow the steps [Creating a Module to contain your
151151- Create a ` CMakeLists.txt ` file and configure for your project
152152- In` add_library ` invoke ` cxx-support ` with the path to the C++ implementation file
153153- 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 ` .
155155- In the example below we will be following the file structure used in [ Creating a Swift Package] ( #Creating-a-Swift-Package )
156156
157157```
@@ -176,7 +176,7 @@ target_include_directories(cxx-support PUBLIC
176176
177177add_executable(CxxInterop ./Sources/CxxInterop/main.swift)
178178target_compile_options(CxxInterop PRIVATE
179- "SHELL:-Xfrontend - enable-experimental-cxx-interop"
179+ "SHELL:-enable-experimental-cxx-interop"
180180target_link_libraries(CxxInterop PRIVATE cxx-support)
181181
182182```
0 commit comments