Skip to content

Commit b5ae29e

Browse files
committed
Resolve conflicts, add doc comments
1 parent 6c03b32 commit b5ae29e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Sources/PackageModel/Destination.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ extension Destination {
243243
binDir: destination.binDir,
244244
extraCCFlags: destination.extraCCFlags,
245245
extraSwiftCFlags: destination.extraSwiftCFlags,
246-
extraCPPFlags: destination.extraCPPFlags
246+
extraCXXFlags: destination.extraCPPFlags
247247
)
248248
} else if version.version == 2 {
249249
let destination = try decoder.decode(path: path, fileSystem: fileSystem, as: DestinationInfoV2.self)
@@ -255,7 +255,8 @@ extension Destination {
255255
binDir: destination.binDir.absolutePath(relativeTo: destinationDirectory),
256256
extraCCFlags: destination.extraCCFlags,
257257
extraSwiftCFlags: destination.extraSwiftCFlags,
258-
extraCPPFlags: destination.extraCPPFlags
258+
// maintaining `destination.extraCPPFlags` naming inconsistency for compatibility.
259+
extraCXXFlags: destination.extraCPPFlags
259260
)
260261
} else {
261262
throw DestinationError.invalidSchemaVersion
@@ -264,6 +265,10 @@ extension Destination {
264265
}
265266

266267
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.
267272
func absolutePath(relativeTo directory: AbsolutePath) throws -> AbsolutePath {
268273
if isRelative {
269274
return directory.appending(RelativePath(string))

0 commit comments

Comments
 (0)