Skip to content

Commit 93cfa7a

Browse files
committed
Removed files with moc_, since they are generated files, and changing them seems to break things. Added yet more escapes for quoted strings to allow them to be interpreted correctly by clang
1 parent 4df3f81 commit 93cfa7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

create-compile-commands.pl

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
}
3232

3333
$tempOutput->flush;
34-
print qx(jq --slurp "unique_by(.file)" $tempOutput ) || die "Unable to make entries unique";
34+
print qx(jq --slurp 'unique_by(.file) | [.[] | select(.file | contains("moc_") | not)]' $tempOutput ) || die "Unable to make entries unique";
3535
close $tempOutput;
3636

3737
sub transformInput {
3838
my( $command, $directory ) = @_;
3939
chomp($command);
40-
$command =~ tr/"//d; #Don't fail if there aren't any quotes to remove
41-
$command =~ tr/\\//d; #Don't fail if there aren't any escapes to remove
40+
$command =~ tr/\\//d; #Remove escapes on thirdparty paths, why are these here?
41+
$command =~ s/"/\\\\\\"/g; #Add escapes to for defines that should be strings
4242
my @removeEcho = split("&&", $command);
4343
$command = $removeEcho[-1]; #Remove last in case there wasn't an echo
4444
$command =~ s/\s+//;

0 commit comments

Comments
 (0)