Files
CMake/Tests/RunCMake/Ninja/CommentsWithNewlines.cmake
T
Ben Boeckel 1bf48e34f4 Ninja: escape special characters in custom command comments
Considerations of Ninja's control sequences was not considered in
30fb5b1b22 (Ninja: add COMMENT to build statement descriptions,
2024-05-01) via !9484. Escape both newlines and dollar signs.

Fixes: #27181
2025-09-02 15:33:20 -04:00

12 lines
371 B
CMake

enable_language(C)
add_executable(comments_with_newlines hello.c)
add_custom_command(TARGET comments_with_newlines PRE_LINK
COMMAND "${CMAKE_COMMAND}" -E echo prelink
COMMENT "prelink with
newline")
add_custom_command(TARGET comments_with_newlines POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E echo postbuild
COMMENT "postbuild with
newline")