[CMake] Crawling documentation to find named argument keywords

Michael Jackson mike.jackson at bluequartz.net
Mon Aug 17 09:15:18 EDT 2015


I thought there used to be a DocBook version of the documentation? At one point I had an XML parser that used that as input to process the documentation in the same way.

Mike Jackson

On Aug 17, 2015, at 8:51 AM, Robert Dailey <rcdailey.lists at gmail.com> wrote:

> I've attached a python script I'm using to obtain a list of keywords
> across all CMake commands that I can use. Can someone let me know if
> this is a reliable way to craw the help documentation to find these
> keywords?
> 
> Note that the keywords I'm referring to are things like APPEND in the
> list() command, or PUBLIC and PRIVATE in the target_link_libraries()
> command. Each command has a set of all-upper-case keywords it uses to
> separate out arguments. I want a list of these keywords for all
> commands in one big list.
> 
> I'm doing this to support syntax highlighting in a text editor.
> 
> To use the script, first pipe out CMake's help to a file like this:
> 
> $ cmake --help-full > help.txt
> 
> Then run it through the python script attached:
> 
> $ python-3.4 strip-options.py help.txt
> 
> This should output to console the list of keywords. I feel like a lot
> are missing. I also got a lot of false positives. Can anyone suggest a
> better way to isolate true argument keywords in the help text?
> <strip-options.py>-- 
> 
> 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/mailman/listinfo/cmake



More information about the CMake mailing list