<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 21, 2014 at 8:06 PM, Matthew Woehlke <span dir="ltr"><<a href="mailto:mw_triad@users.sourceforge.net" target="_blank">mw_triad@users.sourceforge.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 2014-05-15 08:36, Ben Boeckel wrote:<br>
> On Thu, May 15, 2014 at 12:45:27 +0200, Nicolas Desprès wrote:<br>
>> Nope. These variables are the cmake equivalent to the __LINE__ and __FILE__<br>
>> C-pre-processor macro. What I need is the #line directive equivalent which<br>
>> force the value of these variables so that error messages reported by cmake<br>
>> uses the forced value.<br>
><br>
> If you'd like to try a patch, the relevant code is in<br>
> Source/cmExprParser*. Add a callback for #line nnn and update the<br>
> CurrentLine variable cmExprParserHelper.cxx. Don't forget tests :) .<br>
><br>
> This will also likely need a policy since there's no guarantee that<br>
> #line "directives" don't exist in already existing code as comments.<br>
<br>
</div></div>Maybe we should not introduce pragma-like constructs that are<br>
indistinguishable from comments? :-)<br>
<br>
TBH I'd be a little ambivalent about such a feature. A line pragma<br>
itself isn't too bad, but opening the door for other types of pragmas<br>
makes me a little more nervous :-).<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div>If it is possible I would rather prefer a cmake macro too.</div></div><div><br></div>-- <br>Nicolas Desprès<br>
</div></div>