compat/cuda/ptx2c: strip CR from each line

Windows nvcc + cl.exe produce a .ctx file with CR+LF newlines which
need to be stripped to work with gcc.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
Ricardo Constantino 2017-08-29 01:46:13 +01:00 committed by Timo Rothenpieler
parent 1ac03c8dc0
commit 7fbc082577
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ NAME="$(basename "$IN" | sed 's/\..*//')"
printf "const char %s_ptx[] = \\" "$NAME" > "$OUT"
while read LINE
do
printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed 's/["\\]/\\&/g')" >> "$OUT"
printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed -e 's/\r//g' -e 's/["\\]/\\&/g')" >> "$OUT"
done < "$IN"
printf ";\n" >> "$OUT"