[CMake] Adding a new language

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Nov 16 16:03:19 EST 2011


On 2011-11-15 23:35-0500 Bill Hoffman wrote:

> On 11/14/2011 3:24 PM, Alan W. Irwin wrote:
>
>> 
>> If you are willing to make such an OCaml summary, I would be willing
>> to do the same thing for Ada to make our joint case to the CMake
>> developers of what kind of additional generic language support is
>> needed by CMake to deal with the complicated build needs of languages
>> such as OCaml and Ada (and Fortran 95) in a completely generic way.
>> 
>
> There is no case to make, I would love to improve the general language 
> support.  However, either you find someone to develop this for you, or you 
> find someone willing to pay someone to develop it.  That is really how open 
> source works.  Creating a generic way to add new languages that will work on 
> all platforms is a pretty huge task, and will require some serious funding, 
> or someone with lots of free time and skill.

Hi Bill:

Your summary shows you misunderstood what I said so I have to correct
that.  The basic issue I have with your interpretation is "additional
generic language support" != "Creating a generic way to add new
languages"

What I said refers to step by step revisions in how CMake supports
languages.  Each such step has to be evaluated on its merits, costs,
etc., i.e., what I was referring to by "make our joint case". The
other is indeed a huge project, but gives a wrong impression of
what I was asking for which must be corrected.

To use a specific example of such a step, the Ada compiler generates
both *.o files and *.ali (Ada library information) files. The *.ali
files are similar to Fortran 95 module files in the sense that the
location of all *.ali files needs to be known for further Ada binding
and linking steps, and the *.ali files need to be installed.  OCaml
has similar issues.  These issues have already been completely solved
in the Fortran 95 case with special code for the Fortran case. Would
it be difficult to generalize that Fortran-specific code so that Ada
(and OCaml when the time comes) could use it?

Right now for the Ada case I work around the *.ali issues by many
additional compile and link flags in the relevant CMakeLists.txt files
to locate where the *.ali files are generated in the build tree or
installed in the install tree and by using an additional
"install(FILES ..." command and "clean" logic for the *.ali files. It
would be nice to get that mess cleaned up with a proper generalization
of the Fortran modules case, and it would make implementing proper
OCaml language support (if and when) a lot easier. Thus, I think it
makes sense for CMake developers (not necessarily just KitWare
developers, but on the other hand I don't have the required C++ skills
to do this myself) to evaluate the cost of this specific requested
generalization while being careful not to confuse that relatively
small cost with the huge costs of "Creating a generic way to add new
languages".

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list