[cmake-developers] What about #line like feature in cmake language?
Nicolas Desprès
nicolas.despres at gmail.com
Fri May 23 03:39:19 EDT 2014
On Thu, May 22, 2014 at 3:16 PM, Brad King <brad.king at kitware.com> wrote:
>
> One remaining challenge is CMAKE_CURRENT_LIST_FILE and
> CMAKE_CURRENT_LIST_LINE. Since the "current file" is not
> handled by the lexer these may not be consistent unless some
> kind of refactoring is done in the language implementation.
> However, it is not clear whether CMAKE_CURRENT_LIST_FILE can
> safely refer back to some transformed location because sometimes
> code uses it to look next to the file being processed to locate
> other files. If some source location mapping is in place then
> that may not be well-defined.
>
I think we should not touch those variables because they have dynamic
behavior and if they are used in the generated code I expect the current
behavior. Why not adding __FILE__ and __LINE__ tokens that would be
expanded by the lexer with the file name and line number last set by
#cmake-source-line?
--
Nicolas Desprès
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140523/414cb506/attachment-0002.html>
More information about the cmake-developers
mailing list