Am Montag, 26. März 2012, 08:52:59 schrieb Brad King:
> On 3/26/2012 8:28 AM, Rolf Eike Beer wrote:
> >> The find_library command automatically searches "lib" under each path
> >> in CMAKE_SYSTEM_PREFIX_PATH and CMAKE_PREFIX_PATH.  Any path that has
> >> "lib" in it will first be transformed to "lib64" when the above property
> >> is ON.  Using "PATH_SUFFIXES lib64 lib" is not necessary to get lib64
> >> to be searched.
> >
> > Is this also true for everything passed in with PATHS or HINTS?
>
> Yes.  The lib->lib64 translation is a special case in the find_library
> command.  It occurs at the very end, even after PATH_SUFFIXES.

It == "lib is automatically appended". But from your answer below I guess it
is not happening to PATHS or HINTS.

> >>> Is same is true for find_path() and include suffix?
> >>
> >> There is no automatic translation to "include64".  However the command
> >> will search "include" under each prefix as above so one does not need
> >> to write "PATH_SUFFIXES include" to search<prefix>/include with the
> >> find_path command.
> >
> > The question was just about the automatic appending, not include64 ;) So:
> > does it add everything in PATH_SUFFIXES (which automatically includes
> > "include") to paths specified by PATHS and HINTS?
>
> No.  Each find command documents an ordered list of steps it follows
> to add search paths.  A couple of them in find_path take the prefix
> paths and add "include" to each entry.  Other steps add the HINTS
> and PATHS values.  The PATH_SUFFIXES are added to all of them.

ok, I now have:

find_path(VAR header.h
 HINTS /opt/p1
 PATHS /opt/p2
 PATH_SUFFIXES foo)

This would search in /usr/include, /usr/foo, /opt/p1/foo, /opt/p2/foo, but
neither in /opt/p1/include nor /opt/p2/include. Correct?

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to