[cmake-developers] quoted argument \-continuation (was: Roadmap to CMake 3.0)

Brad King brad.king at kitware.com
Wed Oct 23 12:55:45 EDT 2013


On 10/22/2013 07:15 AM, Ian Liu Rodrigues wrote:
>  * Possibility to wrap long lines, maybe with a backslash at the end
>    of the line;

Yes, good idea.  This makes sense inside quoted arguments:

message(STATUS "\
This is the first line! \
It is really long so we split it with a continuation. \
Actually it is the only line!\
")

The syntax has always generated errors in the past so it can be
done without changing behavior for previously working code.

Fortunately some of the recent lexer changes made for the bracket
arguments makes this feature a one-line change to the lexer:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efcf318f

Note that \-continuation does not make sense within the new
bracket-argument syntax whose purpose is to hold literal content
with no escaping.  All backslashes are literal, including those
just before a newline.

Thanks,
-Brad



More information about the cmake-developers mailing list