[cmake-developers] Regression in language support infrastructure for CMake 2.8.10-rc3

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Oct 29 22:17:47 EDT 2012


On 2012-10-29 17:36-0400 David Cole wrote:

> The release is delayed already... I'm not going to start building the
> final release until after I hear back from you. There are still
> several discussions going on around this issue. So.... do let me know
> your results.

OK.  I have tested results for both 2.8.9 and 2.8.10-rc3, and all is
well now with the updated PLplot Ada and D language support (and also
the updated mini-project's Ada language support).  Thanks very much
for your instructions and in particular the link to Brad's commit
message which clarified most issues.

However, it took much longer than it should have because I had some trouble
following your instructions. So assuming you do create documentation
of the changes that must be made to deal with these
backwards-incompatible changes, I suggest that documentation start
(and maybe even end depending on what Brad King says) with these three
key points.

* Replace CMAKE_PLATFORM_ROOT_BIN by CMAKE_PLATFORM_INFO_DIR everywhere.

(Your previous instructions only referred to this indirectly via
Brad's commit message.)

* Replace ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY} by
${CMAKE_PLATFORM_INFO_DIR} in just the few places which
involve a *.cmake file.

(I am not sure it is limited quite that rigorously in general, but
that limit worked for me.  The essential point is the combination
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY} appears throughout
language support files, and virtually in all cases should be left
alone with just a few exceptions.  Thus, some way to specify
_which_ of these instances need to be changed should be
mentioned in the documentation.)

* Specify

if(NOT CMAKE_PLATFORM_INFO_DIR)
   set(CMAKE_PLATFORM_INFO_DIR
   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
endif()

to handle the case of versions of CMake prior to 2.8.10.

(You covered this OK, but I believe you should also be more specific
about the location where the above instructions are placed.  I assume
the above CMake logic fragment should be inserted just before the
project command if the specified language is mentioned in that project
command, and before the enable_language command for that specified
language otherwise.  However, the advice on location should be stated.)

So PLplot (and the mini-project for Ada) are fine now.  However, I
think a specific announcment of this backwards-incompatible change
should be in the 2.8.10 release announcement with a pointer to a file
containing documentation about what has to be done (as above) to
adjust to this change in language support infrastructure.

In sum, I was completely surprised by this backwards-incompatible
change for CMake-2.8.10, but if you follow my suggestions about
announcing the change and documenting what has to be done to keep
external language support working, that element of surprise should be
greatly reduced for other external project developers who are
supporting various 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-developers mailing list