@@ -243,7 +243,7 @@ extension Destination {
243
243
binDir: destination. binDir,
244
244
extraCCFlags: destination. extraCCFlags,
245
245
extraSwiftCFlags: destination. extraSwiftCFlags,
246
- extraCPPFlags : destination. extraCPPFlags
246
+ extraCXXFlags : destination. extraCPPFlags
247
247
)
248
248
} else if version. version == 2 {
249
249
let destination = try decoder. decode ( path: path, fileSystem: fileSystem, as: DestinationInfoV2 . self)
@@ -255,7 +255,8 @@ extension Destination {
255
255
binDir: destination. binDir. absolutePath ( relativeTo: destinationDirectory) ,
256
256
extraCCFlags: destination. extraCCFlags,
257
257
extraSwiftCFlags: destination. extraSwiftCFlags,
258
- extraCPPFlags: destination. extraCPPFlags
258
+ // maintaining `destination.extraCPPFlags` naming inconsistency for compatibility.
259
+ extraCXXFlags: destination. extraCPPFlags
259
260
)
260
261
} else {
261
262
throw DestinationError . invalidSchemaVersion
@@ -264,6 +265,10 @@ extension Destination {
264
265
}
265
266
266
267
fileprivate extension FilePath {
268
+ /// Converts `FilePath` to `AbsolutePath`, in relation to other `AbsolutePath` if possible.
269
+ /// - Parameter directory: an absolute path to a directory used to calculate a resulting `AbsolutePath`.
270
+ /// - Returns: trivially converts `self` to `AbsolutePath` as a string if `self` is an absolute path.
271
+ /// Otherwise, if `self` is a relative path, returns `self` appended to the `directory` argument.
267
272
func absolutePath( relativeTo directory: AbsolutePath ) throws -> AbsolutePath {
268
273
if isRelative {
269
274
return directory. appending ( RelativePath ( string) )
0 commit comments