On 2010-05-13 14:20-0400 Bill Hoffman wrote:
On 5/13/2010 2:09 PM, Alan W. Irwin wrote:
I now have a simple CMakeLists.txt file which demonstrates this is a
general find issue whenever alternate NAMES are specified.
cmake_minimum_required(VERSION 2.8)
project(test NONE)
FIND_LIBRARY(TCL_LIBRARY
NAMES
tcl
tcl86 tcl8.6
tcl85 tcl8.5
tcl84 tcl8.4
tcl83 tcl8.3
tcl82 tcl8.2
tcl80 tcl8.0
)
This was by design. The idea was that you find the first copy of something
that is in the PATH. The names were not expected to be in any particular
order. They were supposed to be equivalent. If it found one good. And,
just like PATH it should find the first one that it finds.
I think you have just described the behaviour that I want and which I
believe most people expect. Search for all names in the first alternate
location, then in the second, etc., until you get a hit. But as my simple
example demonstrates that is not what has been implemented (at least for
FIND_LIBRARY) which is search for the first name in all locations in turn,
then continue for the second name, etc., until you get a hit.
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
__________________________
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake