Re: [cmake-developers] What about #line like feature in cmake language?
On Thu, May 22, 2014 at 3:16 PM, Brad King brad.k...@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 -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On 05/23/2014 03:39 AM, Nicolas Desprès wrote: One remaining challenge is CMAKE_CURRENT_LIST_FILE and CMAKE_CURRENT_LIST_LINE. Since the current file is not [snip] 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. CMAKE_CURRENT_LIST_LINE comes from the lexer currently. I think CMAKE_CURRENT_LIST_FILE could too, and I'm not sure why it does not currently. That would take some investigation in the history to learn. 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? That is what the above variables were meant to be. They just happen to be implemented by replacing during variable evaluation instead of by the lexer. Having the lexer do actual replacements would be a change to the language beyond the scope of the #line proposal. I think this issue as a reason to not add a #line feature. For your generated source case you can add comments that refer back to the original source locations for human reference. -Brad -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On Fri, May 23, 2014 at 3:11 PM, Brad King brad.k...@kitware.com wrote: That is what the above variables were meant to be. They just happen to be implemented by replacing during variable evaluation instead of by the lexer. Having the lexer do actual replacements would be a change to the language beyond the scope of the #line proposal. I see... I think this issue as a reason to not add a #line feature. For your generated source case you can add comments that refer back to the original source locations for human reference. Indeed it is not a strong requirement at your suggestion will work too. I will think more about it and get back to you if I have another idea. Thanks for your time, -- Nicolas Desprès -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
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. 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. -Brad -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
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
Re: [cmake-developers] What about #line like feature in cmake language?
On 2014-05-15 08:36, Ben Boeckel wrote: On Thu, May 15, 2014 at 12:45:27 +0200, Nicolas Desprès wrote: Nope. These variables are the cmake equivalent to the __LINE__ and __FILE__ C-pre-processor macro. What I need is the #line directive equivalent which force the value of these variables so that error messages reported by cmake uses the forced value. If you'd like to try a patch, the relevant code is in Source/cmExprParser*. Add a callback for #line nnn and update the CurrentLine variable cmExprParserHelper.cxx. Don't forget tests :) . This will also likely need a policy since there's no guarantee that #line directives don't exist in already existing code as comments. Maybe we should not introduce pragma-like constructs that are indistinguishable from comments? :-) TBH I'd be a little ambivalent about such a feature. A line pragma itself isn't too bad, but opening the door for other types of pragmas makes me a little more nervous :-). -- Matthew -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On Wed, May 21, 2014 at 8:06 PM, Matthew Woehlke mw_tr...@users.sourceforge.net wrote: On 2014-05-15 08:36, Ben Boeckel wrote: On Thu, May 15, 2014 at 12:45:27 +0200, Nicolas Desprès wrote: Nope. These variables are the cmake equivalent to the __LINE__ and __FILE__ C-pre-processor macro. What I need is the #line directive equivalent which force the value of these variables so that error messages reported by cmake uses the forced value. If you'd like to try a patch, the relevant code is in Source/cmExprParser*. Add a callback for #line nnn and update the CurrentLine variable cmExprParserHelper.cxx. Don't forget tests :) . This will also likely need a policy since there's no guarantee that #line directives don't exist in already existing code as comments. Maybe we should not introduce pragma-like constructs that are indistinguishable from comments? :-) TBH I'd be a little ambivalent about such a feature. A line pragma itself isn't too bad, but opening the door for other types of pragmas makes me a little more nervous :-). If it is possible I would rather prefer a cmake macro too. -- Nicolas Desprès -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On 2014-05-21 15:24, Nicolas Desprès wrote: On Wed, May 21, 2014 at 8:06 PM, Matthew Woehlke wrote: On 2014-05-15 08:36, Ben Boeckel wrote: This will also likely need a policy since there's no guarantee that #line directives don't exist in already existing code as comments. Maybe we should not introduce pragma-like constructs that are indistinguishable from comments? :-) TBH I'd be a little ambivalent about such a feature. A line pragma itself isn't too bad, but opening the door for other types of pragmas makes me a little more nervous :-). If it is possible I would rather prefer a cmake macro too. I don't see why not... in fact it may be easier, since you won't have to fiddle with the parsing at all. My knee-jerk inclination is to add a 'pragma()', e.g. 'pragma(LINE 15 FILE foo.py)', except then I feel like there should be at least a 'pragma(POLICY)' also :-). (See previous comment about it sliding into a major feature.) Maybe something like 'set_reference()' / 'set_script_source()' could be used instead. -- Matthew -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On Wed, May 21, 2014 at 9:31 PM, Matthew Woehlke mw_tr...@users.sourceforge.net wrote: On 2014-05-21 15:24, Nicolas Desprès wrote: On Wed, May 21, 2014 at 8:06 PM, Matthew Woehlke wrote: On 2014-05-15 08:36, Ben Boeckel wrote: This will also likely need a policy since there's no guarantee that #line directives don't exist in already existing code as comments. Maybe we should not introduce pragma-like constructs that are indistinguishable from comments? :-) TBH I'd be a little ambivalent about such a feature. A line pragma itself isn't too bad, but opening the door for other types of pragmas makes me a little more nervous :-). If it is possible I would rather prefer a cmake macro too. I don't see why not... in fact it may be easier, since you won't have to fiddle with the parsing at all. Maybe because at the time the AST node is created the file location is frozen. Locations are controlled by the lexer so do comments. I am not exactly sure because I have not written a parser since a while. CMake's folk would confirm or not. -- Nicolas Desprès -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
2014-05-15 10:08 GMT+02:00 Nicolas Desprès nicolas.desp...@gmail.com: Hi, I am planning to develop a python generator of CMakeLists.txt file for easier integration in an already existing tool. This approach is different from the others approaches consisting in binding the CMake language in a foreign languages. Lua, Javascript and Python have already been tried without success to my knowledge. Generating CMakeLists.txt files seems a simpler approach to me since the CMake language is very stable and it keeps the two projects separated. Finally it reaches the same goal since the idea behind binding CMake in a foreign language is too gain a more general purpose and feature full language with a larger standard library. To assist in such a task the CMake language could provide a command similar to the #line directive found in the C-pre-processor. Changing the filename and line number in the CMakeLists.txt file would make the generator able to transparently run CMake behind the scene while the errors reported by CMake would still refer to the generator input file written by the user. The last time I checked I could not find such a feature in CMake. Did you check those var: CMAKE_CURRENT_LIST_DIR CMAKE_CURRENT_LIST_FILE CMAKE_CURRENT_LIST_LINE message(STATUS ${CMAKE_CURRENT_LIST_LINE}: ${CMAKE_CURRENT_LIST_FILE} Your message) should print the line number and filename with Your message. Is it the kind of feature you are looking for? I am realizing that since version 3 is still under development it might be a good occasion to show up and mention it here. I think that it is not a big change to CMake and that it should not overload the maintenance process. I hope it is not too late for such a proposal since the 5th candidate has just been released. CMake 3 is in RC process I doubt that adding new feature is possible at this stage. -- Erk L'élection n'est pas la démocratie -- http://www.le-message.org -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On Thu, May 15, 2014 at 10:15 AM, Eric Noulard eric.noul...@gmail.comwrote: 2014-05-15 10:08 GMT+02:00 Nicolas Desprès nicolas.desp...@gmail.com: Hi, I am planning to develop a python generator of CMakeLists.txt file for easier integration in an already existing tool. This approach is different from the others approaches consisting in binding the CMake language in a foreign languages. Lua, Javascript and Python have already been tried without success to my knowledge. Generating CMakeLists.txt files seems a simpler approach to me since the CMake language is very stable and it keeps the two projects separated. Finally it reaches the same goal since the idea behind binding CMake in a foreign language is too gain a more general purpose and feature full language with a larger standard library. To assist in such a task the CMake language could provide a command similar to the #line directive found in the C-pre-processor. Changing the filename and line number in the CMakeLists.txt file would make the generator able to transparently run CMake behind the scene while the errors reported by CMake would still refer to the generator input file written by the user. The last time I checked I could not find such a feature in CMake. Did you check those var: CMAKE_CURRENT_LIST_DIR CMAKE_CURRENT_LIST_FILE CMAKE_CURRENT_LIST_LINE message(STATUS ${CMAKE_CURRENT_LIST_LINE}: ${CMAKE_CURRENT_LIST_FILE} Your message) should print the line number and filename with Your message. Is it the kind of feature you are looking for? Nope. These variables are the cmake equivalent to the __LINE__ and __FILE__ C-pre-processor macro. What I need is the #line directive equivalent which force the value of these variables so that error messages reported by cmake uses the forced value. [...] -- Nicolas Desprès -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On Thu, May 15, 2014 at 12:45:27 +0200, Nicolas Desprès wrote: Nope. These variables are the cmake equivalent to the __LINE__ and __FILE__ C-pre-processor macro. What I need is the #line directive equivalent which force the value of these variables so that error messages reported by cmake uses the forced value. If you'd like to try a patch, the relevant code is in Source/cmExprParser*. Add a callback for #line nnn and update the CurrentLine variable cmExprParserHelper.cxx. Don't forget tests :) . This will also likely need a policy since there's no guarantee that #line directives don't exist in already existing code as comments. --Ben -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On 05/15/2014 08:36 AM, Ben Boeckel wrote: If you'd like to try a patch, the relevant code is in Source/cmExprParser*. Add a callback for #line nnn and update the CurrentLine variable cmExprParserHelper.cxx. Don't forget tests :) . cmExprParser is just for the math() command. The language parser is cmListFileLexer.in.l and cmListFileCache.cxx. Tracking of the current source file may need to be moved. The lexer would have to recognize #line syntax and update lexer-line. Be careful to only do so in the main state and not inside a quoted or bracket argument. -Brad -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On Thu, May 15, 2014 at 2:54 PM, Brad King brad.k...@kitware.com wrote: On 05/15/2014 08:36 AM, Ben Boeckel wrote: If you'd like to try a patch, the relevant code is in Source/cmExprParser*. Add a callback for #line nnn and update the CurrentLine variable cmExprParserHelper.cxx. Don't forget tests :) . cmExprParser is just for the math() command. The language parser is cmListFileLexer.in.l and cmListFileCache.cxx. Tracking of the current source file may need to be moved. The lexer would have to recognize #line syntax and update lexer-line. Be careful to only do so in the main state and not inside a quoted or bracket argument. Thanks for the hints. I will be hard for me to work on it during the next weeks. It is just a plan I have. Do you think such a patch would be accepted after version 3 has been released? -- Nicolas Desprès -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On 05/15/2014 09:11 AM, Nicolas Desprès wrote: Do you think such a patch would be accepted after version 3 has been released? I have no objection to the proposed feature to support generated files mapping back to other sources. If the patch is sound and has associated documentation (e.g. Help/manual/cmake-language.7.rst) and tests (e.g. Tests/RunCMake/Syntax) I think it can be accepted. 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. -Brad -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
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. --Ben -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
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 -- 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
Re: [cmake-developers] What about #line like feature in cmake language?
On Thu, May 15, 2014 at 4:05 PM, Brad King brad.k...@kitware.com wrote: 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 That's true. I mentioned #line just because every programmer know it but I don't have any requirement on its name. -- Nicolas Desprès -- 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