[CMake] Adding a new language

Bill Hoffman bill.hoffman at kitware.com
Tue Nov 15 23:30:30 EST 2011


On 11/15/2011 10:13 PM, Stefan Monnier wrote:


> I'm trying to use CMake for a new project here.  This project (a new
> programming language, whose first implementation is in OCaml) is
> currently in the very first stages (I have barely more than the lexer
> written) and doesn't require anything sophisticated (there's only
> 1 OCaml file for now ;-).  So my "language support" is very primitive
> and rather than fight CMake, I'll probably just switch to something
> else :-(

You should be able to use custom commands to what you need in CMake.  It 
really should not be that hard.  You create custom targets for the 
libraries of your language.  You then have custom commands that produce 
the outputs that make up the input to the custom targets.  So, I don't 
think you would need to fight CMake that much.  Just take a different 
approach.

-Bill




More information about the CMake mailing list