[cmake-developers] Export files in the build tree have a total path length which is unnecessarily long

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Aug 8 14:54:54 EDT 2016


On 2016-08-08 13:40-0400 Brad King wrote:

> On 08/07/2016 01:39 AM, Alan W. Irwin wrote:
>> why is the install location of these export files included in the
>> pathname for both export files?
>> That significantly increases the pathlength of these files to no purpose since the
>> install location of these files is already known to CMake by other means.
>
> These files are generated by the install(EXPORT) command.  Their
> location is a staging area for "make install" to copy to the actual
> install destination.  The install destination is used in their
> staging location to make sure there are no collisions.
>
> Normally the install(EXPORT) command is given a relative DESTINATION
> so the path is not very long.  Are you giving it an absolute
> destination?  Why?

PLplot (including the test_fortran subproject to be consistent with
the principal plplot project) has always used absolute install
locations.

It sounds like I could work around the issue by moving PLplot over to
relative install locations, but that is a fairly intrusive change to
our build system so I am a bit reluctant to make that change.
Furthermore, I doubt this problem is unique to the PLplot build system
since presumably there are other projects that use absolute install
locations as well because such install locations are typically well
supported by CMake. The only exception to that support that I am aware
of at this time is this particular install(EXPORT) case where the
(encoded) absolute staging area potentially adds so much to the total
length of the pathname.

Is this the only case where you have a staging area in the build tree
that corresponds to an install pathname?

For all such staging areas, would it be straightforward to hash the
paths for the cmake-generated EXPORT files in the build tree to
substantially reduce their pathlengths for the absolute install
location case while still avoiding name collisions?

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