[CMake] Status of FindHDF5.cmake in CMake?

Will Dicharry wdicharry at stellarscience.com
Fri May 20 17:32:16 EDT 2011


J.S. van Bethlehem wrote:
> Hej Will,
> I'm not sure if this is the proper way to reply and I haven't checked 
> your second mail with the attachment. But I think in #3 you're 
> definitely doing something wrong. It took me quite a while to figure 
> out, because the documentation is rather sparse, but whenever there is 
> a hdf5-config.cmake file, you should not read that from a Find*.cmake 
> file. Whenever there is such a file present, what should happen is 
> that CMake finds it and reads it and that's that.
> Even more precise: whenever a user writes find_package(HDF5) and the 
> hdf5-config.cmake exists, CMake will read that file and will NOT go 
> look for FindHDF5.cmake. The hdf5-config.cmake should then explicitly 
> set all the (cached) variables you normally would have to 'calculate' 
> in the FindHDF5.cmake file.
> So to be short: the FindHDF5.cmake file should never be required to 
> look for hdf5-config.cmake - CMake should be left to be the one to do 
> that. The HDF5 installer should be the one that installs the 
> hdf5-config.cmake into for example <prefix>/share/HDF5/cmake or some 
> similar path (look for documentation of find_package for possible 
> locations where CMake will look)
>

 From previous instructions by the Kitware developers, I was under the 
impression that I needed to do something like

find_package( HDF5 QUIET NO_MODULE )

from the FindHDF5.cmake module. It looks like FindVTK does this. Either 
way, the HDF5 CMake build does not set the standard *_INCLUDE_DIRS and 
*_LIBRARIES variables in the config file, so I have to do something. Can 
a Kitware person shed some light on this?

Thanks,
Will

> But again: I haven't read the actual file you created :P Maybe I'm 
> overlooking some details of this particular package.
>
> Greetsz,
> Jakob
>
> Will Dicharry wrote:
>> Hi All,
>>
>> I neglected the FindHDF5 module for a while because I was shifted to 
>> another project that was kind of far from CMake work, but there were 
>> a few requests for fixes features to the module. I think I have a 
>> file that has the important ones. It's attached to this message. 
>> Brad, I know I had CVS access, but I don't think I have Git access. 
>> If you'd like me to push my commits, I can but I think I'd need you 
>> to reauthorize me to do so.
>>
>> The changes to this module are:
>> 1. Tim Gallagher's (cc'd) patch to handle the HDF5 Fortran library.
>> 2. hdf5_hl is now an optional component that can be requested like 
>> the language bindings.
>> 3. If I can find hdf5-config.cmake from the native HDF5 cmake build, 
>> I use it.
>>
>> I'd like it if the people I cc'd (who appear to be interested in at 
>> least one of these features) could try it and see if it works for 
>> them. I'd also like to know if I did #3 correctly, since there don't 
>> really appear to be any modules in the CMake repository that wrap 
>> around config files that don't set the variables defined in the Find 
>> module.
>>
>> Thanks,
>> Will
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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 --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5852 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110520/8b13c76e/attachment-0001.bin>


More information about the CMake mailing list