[CMake] CMake 2.8.4 -- FindITK.cmake fails to find ITK even when ITK_DIR is properly set.

David Cole david.cole at kitware.com
Tue Mar 8 11:07:19 EST 2011


Is it in a public repo? Can we just try to repro the "complicated" case
here?


On Tue, Mar 8, 2011 at 11:01 AM, kent williams <nkwmailinglists at gmail.com>wrote:

> Thanks for getting back to me on this.  After my initial post I tried
> to come up with some 'cut-down' examples, and the simple cases work.
> I'll keep trying to get a version that exhibits this failure.
>
> This is kind of a worst case for debugging.  I have a top level
> CMakeLists.txt file that builds ITK. Then, it builds several projects
> as ExternalProjects, passing in ITK_DIR in CMAKE_ARGS.  It's in that
> secondary configure -- the one that make does as part of the build --
> where I get a failure.
>
> On Tue, Mar 8, 2011 at 7:17 AM, Brad King <brad.king at kitware.com> wrote:
> > On 03/07/2011 03:59 PM, kent williams wrote:
> >> Looking at the difference between FindITK.cmake in 2.8.3 and 2.8.4 it
> >> looks like someone replaced trusting the ITK_DIR variable and using it
> >> directly if defined, with
> >>
> >> FIND_PACKAGE(ITK QUIET NO_MODULE
> >> NAMES ITK InsightToolkit CONFIGS ITKConfig.cmake)
> >>
> >> Which doesn't work -- it appears to ignore ITK_DIR and doggedly insist
> >> that it can't find ITK.
> >
> > The find_package command will use ITK_DIR without searching at all if it
> is set.
> > I can't reproduce your problem.  CMake 2.8.4 finds ITK for me in all the
> cases
> > it used to find it plus more.  Setting ITK_DIR hands it the answer and it
> works.
> > Please send a complete sample CMakeLists.txt that shows this problem
> along with
> > a listing of the contents of ${ITK_DIR} on your disk.
> >
> > Thanks,
> > -Brad
> >
> _______________________________________________
> 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/20110308/f3cd5f9c/attachment.htm>


More information about the CMake mailing list