[ITK] Compile ITK 4.7.0 with System HDF5
Matt McCormick
matt.mccormick at kitware.com
Fri Feb 20 02:12:18 EST 2015
Hi Mike,
Help in updating the HDF5 library would be welcome. The process of
updating from upstream is currently bundensome, but if we use newly
added infrastructure to perform a git subtree merge [1], it will be
much easier to maintain in the future.
Thanks,
Matt
[1] http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/Maintenance/UpdateThirdPartyFromUpstream.sh;h=4f009bb9423816358a90818a49d0efbba7b24c32;hb=HEAD
On Thu, Feb 19, 2015 at 1:19 PM, Michael Jackson
<mike.jackson at bluequartz.net> wrote:
> HDF5 1.8.14 generates those cmake files that are needed but the version
> included with ITK is only 1.8.12 which did not have all of the newer cmake
> improvements in 1.8.14. The issue is that I had to set all of the HDF5
> related variables which even for someone who has lots of CMake experience
> can be an issue. The biggest problem I had was that even though I would set
> HDF5_DIR to one directory, ITK seemed to simply ignore those settings (made
> through theCMake-GUI app) and use "something else". I just have no idea
> where it came up with the paths that ITK decided to use. After lots of
> changing things and lots of iterations I was finally able to convince ITK to
> compile against the System HDF5. One of the issues was that once I got paths
> set and sticking from configure to configure I still had to manually fill
> out:
>
> HDF5_C_LIBRARY =
> debug;C:/DREAM3D_SDK/hdf5-1.8.14/lib/hdf5_D.lib;optimized;C:/DREAM3D_SDK/hdf5-1.8.14/lib/hdf5.lib
>
> as it was only picking up the Debug libraries. And since I'm on Visual
> Studio linking a release build of something against a Debug build of
> something is bad news.
>
> How hard is it going to be to update the ITK build system with the newer
> version of HDF5? Can it try the "new" way to find HDF5 with Find_Package()
> and a fall back to previous behavior if not found? The big issue for us is
> that our project already uses HDF5 and we are trying to bring in ITK for
> image processing. But the configuration of ITK is stopping us in our tracks.
> After fighting my way through this all yesterday afternoon I finally got it
> to work. Now I just need to relay these convoluted directions to the rest of
> my developers.
>
> Thanks for any suggestions
> Mike Jackson
> DREAM3D.io
>
> Matt McCormick
> Wednesday, February 18, 2015 9:21 PM
> Hi Mike,
>
> More guidance may be required when configuring against a system HDF5.
> HDF5 currently uses CMake as a secondary build system configuration,
> and some of its configurations could be improved.
>
> Setting HDF5_DIR on the first configure may help. Also, helping
> upstream improve their CMake configuration is a good idea :-). CMake
> has every improving guidance on cmake packages [1].
>
> Thanks,
> Matt
>
> [1] http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html
>
> On Wed, Feb 18, 2015 at 6:34 PM, Michael Jackson
> Michael Jackson
> Wednesday, February 18, 2015 6:34 PM
> I have recently built HDF5 version 1.8.14 on my Windows 8.1 machine using
> Visual Studio 2013 compilers. Now when I configure ITK 4.7.1 to build using
> the "System HDF5" it picks up the installation of HDF5-1.8.14 in the
> C:/Users/mjackson/Workspace/hdf5-1.8.14 instead of the actual installation
> location of C:/DREAM3D_SDK/hdf5-1.8.14
>
> Then when I attempt to actually compile ITK I get a compile error that says
> it can not find include file "H5Cpp.h".
>
> So I rerun CMake and set the HDF5_DIR to
> C:/DREAM3D_SDK/hdf5-1.8.14/cmake/hdf5 and configure.
>
> I have also noticed that I have to manually set the HDF5_LIBRARIES to
> include both the debug and release versions of the libraries.
>
> I have never had to manually enter all this kind of information before with
> CMake projects. I am wondering if I just missing something simple with HDF5?
>
> Thanks
> _________________________________________________________
> Mike Jackson mike.jackson at bluequartz.net
> BlueQuartz Software www.bluequartz.net
> Principal Software Engineer Dayton, Ohio
>
>
> --
> Sent with Postbox
More information about the Community
mailing list