opencl: fix MSVC builds (string length error)

This commit is contained in:
Max Krasnyansky 2024-12-12 22:03:27 -08:00
parent b25a4caaf4
commit b41b6e679f

View file

@ -2,7 +2,7 @@
import sys import sys
import logging import logging
logger = logging.getLogger("opencl-embed-kernerl") logger = logging.getLogger("opencl-embed-kernel")
def main(): def main():
@ -15,9 +15,8 @@ def main():
ifile = open(sys.argv[1], "r") ifile = open(sys.argv[1], "r")
ofile = open(sys.argv[2], "w") ofile = open(sys.argv[2], "w")
ofile.write("R\"(\n\n") for i in ifile:
ofile.write(ifile.read()) ofile.write('R"({})"\n'.format(i))
ofile.write("\n)\"")
ifile.close() ifile.close()
ofile.close() ofile.close()