Fixes errors like this with Cygwin in a crlf environment with
SHELLOPTS=igncr:
/cygdrive/c/Users/magja/graphviz/build/lib/common/common/colortbl.h:1524:2: error: missing terminating " character
1524 | {"/svg/ ",0,255,255,255,0,0,0},
| ^~~~~~
Although not shown in the error message, this line actually contained
a carriage return after /svg/:
{"/svg/\r",0,255,255,255,0,0,0},
add_custom_command(
OUTPUT svgcolor_lib
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names ${TOP_SOURCE_DIR}/awk/svgcolor.awk
- COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/svgcolor.awk
+ COMMAND ${AWK_EXECUTABLE} -v RS="\\r*\\n" -f ${TOP_SOURCE_DIR}/awk/svgcolor.awk
${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names > ${CMAKE_CURRENT_BINARY_DIR}/svgcolor_lib
)
add_custom_command(