Skip to content

Commit 56178cd

Browse files
committed
[xcodegen] Allow absolute path for output in compile commands
Looks like in newer versions of CMake this can be an absolute path.
1 parent 364dbf8 commit 56178cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

utils/swift-xcodegen/Sources/SwiftXcodeGen/BuildArgs/ClangBuildArgsProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct ClangBuildArgsProvider {
4242
else {
4343
continue
4444
}
45-
let output = command.output.map { command.directory.appending($0) }
45+
let output = command.output.map { $0.absolute(in: command.directory) }
4646
if let existing = commandsToAdd[relFilePath],
4747
let existingOutput = existing.output,
4848
output == nil || existingOutput.exists || !output!.exists {

utils/swift-xcodegen/Sources/SwiftXcodeGen/Command/CompileCommands.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension CompileCommands {
2727
struct Element: Decodable {
2828
var directory: AbsolutePath
2929
var file: AbsolutePath
30-
var output: RelativePath?
30+
var output: AnyPath?
3131
var command: Command
3232
}
3333
}

0 commit comments

Comments
 (0)