Thanks Tim. I was able to make this change work for my case … I had to do the same thing with both C and Fortran that you did with Fortran.
I can also see why the fix is not comprehensive. The method does not fix “Fortran_HL”, but rather makes hdf5hl_fortran available by lumping it in with “Fortran” (same for C). Because the two are lumped together, if someone only needed hdf5 and did not have hdf5_hl installed, the script would fail. Also, the patch would need to eliminate the components HL and Fortran_HL … since it designs away from making these available. There is probably a fix that would preserve these as independent components, though I don’t have the experience with cmake to write it. The part of the script that looks for libraries is looping over languages rather than components. The C and Fortran components get found because they are also language names. To really fix this right, we would need to change the logic to search all the components. From: Tim Gallagher [mailto:[email protected]] Sent: Saturday, June 23, 2012 1:00 PM To: Ateljevich, Eli Cc: [email protected] Subject: Re: [CMake] FindHDF5.cmake configuration -- finds regular, can't find HL I reported this awhile back: http://public.kitware.com/Bug/view.php?id=12316 The patch I attached would work, but it fails in some select cases so it wasn't put in. I don't remember the details, it may fail when there is no HL or something. But you can try it and see if it works for your case. Tim ________________________________ From: "Eli Ateljevich" <[email protected]> To: [email protected] Sent: Saturday, June 23, 2012 3:57:03 PM Subject: [CMake] FindHDF5.cmake configuration -- finds regular, can't find HL Hi all, I am supporting cmake version 2.6. I have included the latest FindHDF5.cmake file I could find in my distro … except for one dependency that needed to be added, this seems to work fine. When I try to find_package(HDF5 COMPONENTS … ) it works for the C (and Fortran) component but not for the HL library or Fortran_HL. Here is the output for the C language HL variant: -- Found HDF5: HDF5_hdf5_hl_LIBRARY_RELEASE-NOTFOUND;/usr/local/dms/pkg/hdf5/1.8.7-intel12.0-parallel/lib/libhdf5.a;/usr/lib64/libz.so;/usr/lib64/libm.so Could it be cmake is looking for the unadorned libhdf5.a for the regular library and libhdf5-release or something like that for the hl library. Why the difference? If so is this a type of behavior that can be switched off? Here are the contents of the directory, in case the issue of the HL libraries not being there comes up: $ ls /usr/local/dms/pkg/hdf5/1.8.7-intel12.0-parallel/lib libhdf5.a libhdf5_hl.a libhdf5_hl.la libhdf5_fortran.a libhdf5hl_fortran.a libhdf5.la libhdf5_fortran.la libhdf5hl_fortran.la libhdf5.settings Thanks for any insight. I realize numerous patches have been made to FindHDF5.cmake, and that I might be voiding my warranty by backwards porting it, but it sure seems like it should work for all the components if it works for two of them. Eli -- 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
-- 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
