[cmake-developers] What about #line like feature in cmake language?

Brad King brad.king at kitware.com
Thu May 15 10:05:27 EDT 2014


On 05/15/2014 09:39 AM, Ben Boeckel wrote:
> On Thu, May 15, 2014 at 09:22:32 -0400, Brad King wrote:
>> I do not think the policy Ben mentioned will be needed.  The syntax
>>
>>  #line 1234 "/path/to/real/file"
>>
>> is fairly obscure and will be treated as a comment by older CMakes.
> 
> My thought was that such rogue existing comments might give really
> unhelpful backtraces, but I do agree that it's probably rare enough to
> ignore if wanted (similar to foreach (IN LISTS)) since it does seem
> beneficial enough.

Since the files are generated there is no reason the syntax has to
be short.  We could use:

 #cmake-generated-from-line 1234 "/path/to/real/file"

or:

 #cmake-source-line 1234 "/path/to/real/file"

-Brad




More information about the cmake-developers mailing list