mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[xcodegen] Allow absolute path for output in compile commands
Looks like in newer versions of CMake this can be an absolute path.
This commit is contained in:
@@ -42,7 +42,7 @@ struct ClangBuildArgsProvider {
|
||||
else {
|
||||
continue
|
||||
}
|
||||
let output = command.output.map { command.directory.appending($0) }
|
||||
let output = command.output.map { $0.absolute(in: command.directory) }
|
||||
if let existing = commandsToAdd[relFilePath],
|
||||
let existingOutput = existing.output,
|
||||
output == nil || existingOutput.exists || !output!.exists {
|
||||
|
||||
@@ -27,7 +27,7 @@ extension CompileCommands {
|
||||
struct Element: Decodable {
|
||||
var directory: AbsolutePath
|
||||
var file: AbsolutePath
|
||||
var output: RelativePath?
|
||||
var output: AnyPath?
|
||||
var command: Command
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user