[CMake] List of 'Reserved Words'

Michael Jackson mike.jackson at bluequartz.net
Tue Nov 18 16:18:45 EST 2008


On Nov 18, 2008, at 4:10 PM, Alexander Neundorf wrote:

> On Tuesday 18 November 2008, Michael Jackson wrote:
>> On Nov 18, 2008, at 3:49 PM, Alexander Neundorf wrote:
>>> On Tuesday 18 November 2008, Michael Jackson wrote:
>>>> On Nov 18, 2008, at 2:59 PM, Alexander Neundorf wrote:
>>>>> On Tuesday 18 November 2008, Michael Jackson wrote:
>>>>>> Is there a list of the "reserved words" or Keywords for CMake.
>>>>>> Examples would be:
>>>>>>
>>>>>> AND, NOT, OR, PROPERTIES, CACHE, FORCE..
>>>>>
>>>>> Not really.
>>>>> The one here should be quite current:
>>>>> http://websvn.kde.org/trunk/KDE/kdelibs/kate/syntax/data/cmake.xml?revi
>>>>> si on=773845&view=markup
>>>>>
>>>>> Alex
>>>>
>>>> Cool. That was pretty close to what I was looking for but it looks
>>>> like there are some "CMake Variables" in there also (WIN32). I will
>>>> have to factor those out.
>>>
>>> I just noticed it wasn't updated for some time.
>>> I added some of the new stuff now.
>>> http://websvn.kde.org/trunk/KDE/kdelibs/kate/syntax/data/cmake.xml?view=l
>>> og
>>>
>>> Alex
>>> _______________________________________________
>>> CMake mailing list
>>> CMake at cmake.org
>>> http://www.cmake.org/mailman/listinfo/cmake
>>
>> Thanks. But how exactly are you "adding" those? By Hand or do you  
>> have
>> some sort of script that parses CMake or .. ? It would be great if we
>> could "sync up" the kate and some of the other editors to
>> "standardize" on how the syntax coloring is broken down.
>
> Manually.
> The commands and properties can be done using the cmake help
> (cmake --help-command-list etc.)
> If you have something we'd surely be happy :-)
>
> Alex

I have a couple of things that might help.

There is: <http://www.cmake.org/Wiki/CMake:CreateQtAssistantDocs>   
which I wrote to generate Qt Assistant style documentation which could  
be easily changed to generate the needed xml file for kate. The  
downside to this is that it would only run under MinGW or Cygwin on  
windows as it is a bash script.

I have a C++ program (depends on some boost and expat) that parses the  
CMake DocBook xml file and extracts out the various bits and pieces  
and then generates xml or whatever based on what was read. Currently I  
have it extracting out the commands, deprecated commands, properties  
and cmake variables. For each of those it will also parse out the  
"brief documentation" for the 'thing' being parsed, the usage (for  
commands) and if it is deprecated or not.

If you take a look at <http://cmakeed.svn.sourceforge.net/viewvc/cmakeed/trunk/com.cthing.cmakeed.core/plugin.xml?view=markup 
 > you can see what type of XML I happen to be generating for the  
CMakeEd Eclipse Plugin.

Looking at the kate syntax xml I can certainly generate that xml from  
my program. I can just lump together the cmake variables, properties  
and 'special arguments' into the 'special arguments' xml section of  
the kate syntax xml.

I would be more than happy to contribute the code to the KDE project  
under what ever license it needs to be.


_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio





More information about the CMake mailing list