On Thursday, May 22, 2014 09:16:17 Brad King wrote: > On 05/21/2014 04:05 PM, Nicolas Desprès wrote: > > at the time the AST node is created the file location is frozen. > > Locations are controlled by the lexer so do comments. > > Correct. This has to be done by the lexer. We already have > documentation blocks that are "indistinguishable from comments": > > #.rst: > # ...reStructuredText docs... > > #[=====[.rst: > ...reStructuredText docs... > #]=====] > > I see no reason this can't be used for #line too: > > #.cmake-source-line: 1234 "/path/to/real/file" > > In all of the above cases there is no semantic meaning to the > comments as far as the CMake language processor is concerned. > The last case only changes the file names and line numbers in > backtraces. > > One remaining challenge is CMAKE_CURRENT_LIST_FILE and > CMAKE_CURRENT_LIST_LINE.
Probably also CMAKE_CURRENT_LIST_DIR. Alex -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers