[CMake] improve the CMake language?

Bill Hoffman bill.hoffman at kitware.com
Thu Nov 8 09:24:13 EST 2007


Gonzalo Garramuño wrote:

>> 3) Your license choices are fine for your own use, but you'd need to
>> talk to Kitware about what they actually want.
>>
> 
> Now, that could be a fair point.  If I was interested in having Kitware 
> distribute cmake with ruby.  Which albeit I like the idea, I don't think 
> I pushed for it.
> As I said, I'm more interested in having a cmake have a language API or 
> swig wrappings.  That way, I don't really have to make a commitment to a 
> scripting language that can fall out of flavor later on.
> I'd also rather offer people several options and let the best language 
> arise naturally from that choice.  SWIG allows you to do that with the 
> least pain, even if the project is under heavy development like cmake.
> 
> Also, you guys are just thinking of embedding the language into cmake. I 
> think it is much easier (and less of a license trouble) to do the 
> opposite.  Make cmake a *library* to the scripting languages.  That is 
> (for ruby):
> 
> require 'cmake'
> include CMake
> 
> generator = 'Unix Makefiles'
> cxx_flags = "-W 3"
> sources   = %w( hello.cpp )
> 
> add_executable( :hello, :sources => sources )
> 
I guess I can speak for Kitware here.  We have very little interest in 
maintaining CMake as a library.  It is just too much work.  There is a 
big difference between maintaining an executable, and a library. 
Backwards compatibility becomes a much bigger problem as the API becomes 
much bigger if you expose the library as part of the API.  Also, I am 
not sure having N languages for CMake would be the best approach.  So, 
you go to build a project, and hey they are using CMake, cool, I know 
how to run CMake, oh wait, that one is ruby CMake, I need to get the 
ruby CMake to build it.  Would Kitware have to distribute N binaries? 
One of the biggest complaints about CMake, is that it requires CMake to 
be installed in order to do the build.  What if it required N different 
binaries where N was decided on by the project doing the build.  I just 
don't think that would be in the best interest of the community.  At the 
end of the day CMake should be like make, it should be a binary utility 
that is available by default on every OS.  It is a single interface so 
that if you know how to use it in one place you can use it in another.

-Bill


-Bill



More information about the CMake mailing list