File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ func xcodeProject(
126
126
// paths so that all the products can be found.
127
127
projectSettings. common. DYLIB_INSTALL_NAME_BASE = " @rpath "
128
128
129
+ // Set the `Xcode` build preset in Swift to let code conditionalize on
130
+ // being built in Xcode.
131
+ projectSettings. common. OTHER_SWIFT_FLAGS = [ " $(inherited) " , " -DXcode " ]
132
+
129
133
// Add any additional compiler and linker flags the user has specified.
130
134
if !options. flags. cCompilerFlags. isEmpty {
131
135
projectSettings. common. OTHER_CFLAGS = options. flags. cCompilerFlags
@@ -134,12 +138,9 @@ func xcodeProject(
134
138
projectSettings. common. OTHER_LDFLAGS = options. flags. linkerFlags
135
139
}
136
140
if !options. flags. swiftCompilerFlags. isEmpty {
137
- projectSettings. common. OTHER_SWIFT_FLAGS = options. flags. swiftCompilerFlags
141
+ projectSettings. common. OTHER_SWIFT_FLAGS + = options. flags. swiftCompilerFlags
138
142
}
139
143
140
- // Also set the `Xcode` build preset in Swift to let code conditionalize on
141
- // being built in Xcode.
142
- projectSettings. common. OTHER_SWIFT_FLAGS += [ " -DXcode " ]
143
144
projectSettings. common. MACOSX_DEPLOYMENT_TARGET = " 10.10 "
144
145
145
146
// Prevent Xcode project upgrade warnings.
You can’t perform that action at this time.
0 commit comments