[CMake] List of Commands/Constants/Keywords

Mike Jackson mike.jackson at imts.us
Sun Nov 19 14:54:39 EST 2006


cmake --help-commands doesn't list anything: Here is the output:
[_Mike]$ cmake --help-commands
CMake Error: The source directory "/home/welsh/For_Mike/--help-commands"
does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

I did take a look at the vim spec and that got me started. Most of the
commands are now highlighted properly.

The list of CMAKE_* would be helpful to list in the language definition so
that those constants show up differently and I am working on that part.

I was hoping that there was someway to either run a command or grep the
cmake sources and get a definitive list of commands.

Same thing for a list of CMAKE_* constants.. And any other constants that
Cmake defines.

Thanks
Mike Jackson


On 11/19/06 1:44 PM, "Bill Hoffman" <bill.hoffman at kitware.com> wrote:

> Brandon J. Van Every wrote:
>> Mike Jackson wrote:
>>> Is there a way to generate the list of Cmake keywords/Constants/Commands
>>> that can appear in a Cmake file? I am trying to write a language
>>> definition
>>> for TextMate on OS X and a list of these would make life simpler.
>>> 
>>> I seem to remember a posting about this to the list but I am not
>>> coming up
>>> with the right search string to find it again.
>>>   
>> 
>> I remember that post as well.  This is what I saved and have
>> occasionally used.  I do not know if it's comprehensive.
>> 
>> 
>> FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "")
>> GET_CMAKE_PROPERTY(res VARIABLES)
>> FOREACH(var ${res})
>>  FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
>>             "${var} \"${${var}}\"\n")
>> ENDFOREACH(var ${res})
>> 
>> 
> I don't think this is what you want for a cmake mode in an editor.
> cmake --help-commands will list all available commands.   There are also
> emacs and vim modes that can be found here:
> http://www.cmake.org/HTML/Download.html
> They might be good places to start.   I think the emacs mode just looks
> for foo(...),
> and has information about if and other control commands.
> 
> -Bill
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services






More information about the CMake mailing list