[CMake] improve the CMake language?

Bill Hoffman bill.hoffman at kitware.com
Thu Nov 1 22:18:26 EDT 2007

Sanchez, Juan wrote:
> Tcl is a nice language for implementing declarative commands.  It can be 
> easily built on about every platform out there, and the language rules 
> are well known.  It is small, and very easy to compile a standalone Tcl 
> based interpreter with the CMake commands built in.  The user would not 
> need to have any language installed, you could package the source with 
> CMake or make it part of the cmake binary you distribute.  It is freely 
> distributable and has a BSD license.
> add_library(foo SHARED foo.cxx)
> could become
> add_library {foo SHARED foo.cxx}
> or even
> add_library -name foo -type SHARED foo.cxx

I can't help myself, I have to respond....  :)

Or it could be:

add_library(foo SHARED foo.cxx)

Hey, wait, that already works...  :)

The point is you don't need tcl, python, or ruby to add add a library. 
You need a simple language, and I want it to work with only a c++ 
compiler and its standard libraries.  So, when someone wants to build a 
c++ program with CMake on a new platform, they don't first have to port 
(tcl/python/ruby/XXX), the just need to have a c++ compiler, which they 
should have if they are building a c++ application.  It is sort of a 
prerequisite to have a c++ compiler to build a c++ application, so we 
know it will be there.

Sorry Juan, your suggestion is valid, and perhaps I should create a FAQ 
entry like: Why the CMake Language?  So, I can point to it when this 
comes up.


More information about the CMake mailing list