Fixes errors like this with Cygwin in a crlf environment with
SHELLOPTS=igncr:
/cygdrive/c/Users/magja/graphviz/build/plugin/core/ps.h:2:1: error: missing terminating " character
2 | "%%BeginProlog ",
| ^~~~~~~~~~~~~~
Although not shown in the error message, this line actually contained
a carriage return after %%BeginProlog:
"%%BeginProlog\r",
add_custom_command(
OUTPUT ps.h
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ps.txt
- COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/stringize.awk
+ COMMAND ${AWK_EXECUTABLE} -v RS="\\r*\\n" -f ${TOP_SOURCE_DIR}/awk/stringize.awk
${CMAKE_CURRENT_SOURCE_DIR}/ps.txt > ${CMAKE_CURRENT_BINARY_DIR}/ps.h
)