On 2008-04-14 15:56-0700 Alan W. Irwin wrote:
Furthermore, making X11_LIBRARIES fullpath would benefit the PLplot build
(and presumably other builds as well). When first setting up the CMake-based
build system for PLplot, I either copied from our previous autotools-based
build system or I may have noticed the potential for -l flags in
X11_LIBRARIES. But in any case, I prepended X11_LIBRARIES with
"-L${X11_LIBRARY_DIR}" so that our users could have a non-standard install
location for X (especially important for this era of frantic X development
activity where some X testers may have multiple versions of X installed on
their platform). However, this -L flag leads to CMP0003 warnings for the
2.6.0 release candidate since fullpath libraries are preferred for 2.6.x.
(Also, X11_LIBRARY_DIR is an undocumented variable for FindX11.cmake which
I would prefer not to depend upon in the long term.)
It turns out the X11_X_EXTRA_LIBS component of X11_LIBRARIES (the component
that potentially produces -l flags in FindX11.cmake) is determined by
multiple invocations of CHECK_LIBRARY_EXISTS with the third argument
(location) an empty string. Thus, X11_X_EXTRA_LIBS -l flags only correspond
to default system locations. This means the "-L${X11_LIBRARY_DIR}" flag is
completely unneeded for PLplot so I will remove it.
It would be trivial to transform the -l flags in X11_X_EXTRA_LIBS to
fullpath names with the appropriate FIND_LIBRARY calls since only the system
default location needs to be searched. However, now there is no motivation
for this change since the above "-L${X11_LIBRARY_DIR}" (or apparently any
other use of the internal X11_LIBRARY_DIR variable determined by
FindX11.cmake) is not needed.
Thus, it appears the present FindX11.cmake in 2.6.0-RC-8 is fine. My
apologies for taking so long to arrive at this conclusion.
Alan
The only remaining issue is replacing the -l flags in X11_X_EXTRA_LIBS with
full path names (which Bill has agreed is a worthwhile long-term
goal.
Furthermore, it also
should make it extremely easy to modify FindX11.cmake to replace the -l flags
with fullpath name libraries which Bill has agreed is a worthwhile long-term
goal.
Of course, there are workaround for CMP0003 warnings, but the clean solution
would be if a CMake developer would simply change FindX11.cmake in cmake cvs
and also for 2.6.0 so that X11_X_EXTRA_LIBS and therefore X11_LIBRARIES are
always consistently fullpath. That would allow me to stop prepending
"-L${X11_LIBRARY_DIR}" to X11_LIBRARIES which would eliminate the CMP0003
warnings without compromising the need of some who require a non-standard
install location for X.
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); PLplot scientific plotting software
package (plplot.org); 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
__________________________
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake
__________________________
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); PLplot scientific plotting software
package (plplot.org); 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
__________________________
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake