[CMake] FIND_PATH issue in FindQt4.cmake

Harinarayan Krishnan hkrishnan at lbl.gov
Tue Feb 15 13:59:21 EST 2011


Hi All,

I reran my code using cmake 2.8.4rc and still get the same issue where
FIND_PATH is picking the system directory for QT_CORE over my install
directory passed through HINTS ${qt_headers}. If this is not related to
CMAKE_FIND_FRAMEWORK should I file a bug report on this?

Thanks,
Hari

On Tue, Feb 15, 2011 at 10:23 AM, Andreas Pakulat <apaku at gmx.de> wrote:

> On 15.02.11 06:34:07, Harinarayan Krishnan wrote:
> > Hi All,
> >
> > Thanks for the help so far, I will check and see if CMake 2.8.4rc has the
> > same issue meanwhile I noticed that FIND_PATH seems to have special
> > instructions for Darwin machines with the use of CMAKE_FIND_FRAMEWORK on
> > page
> http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_path
> >
> > The notes are a little confusing: it says CMAKE_FIND_FRAMEWORK defaults
> to
> > "FIRST" on Darwin systems which I can interpret one of two ways.
> >
> > First, If a standard library and a framework are found in the same search
> > order then CMAKE will use this variable to determine which to pick first.
> >
> > Second, if a framework is found regardless of where it is in the search
> > order it will be picked. I suspect the choice is the first one. However,
> in
> > my test I found that if I set CMAKE_FIND_FRAMEWORK to be "LAST" then
> CMAKE
> > picks the proper path. This would make me think the second option is at
> play
> > or it is just pure coincidence that this option happened to give me the
> > correct result.
> >
> > Any of you know what the correct option is? To me it would make sense
> that
> > FIND_PATH honors the search order which would mean that the HINTS option
> in
> > FindQt4 should have higher precedence than the Framework in the
> > CMAKE_SYSTEM_FRAMEWORK_PATH.
>
> This cannot be answered without looking at the source code (as its not
> documented properly) to check what exactly the algorithm does. That is
> wether it iterates of the individual path in each of the steps and then
> checks for framework and afterwards for standard headers in that path or
> if it first checks all paths in a step for frameworks and then again
> checks all paths for standard headers. Depending on which of the two it
> is, the outcome of a find_path may depend on the order of the input
> path-variables (like CMAKE_PREFIX_PATH) or not.
>
> Andreas
>
> --
> You are the only person to ever get this message.
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110215/29d1e724/attachment.htm>


More information about the CMake mailing list