This probably isn't the best solution but until CMake fixes the bug and includes the updated FindHDF5.cmake file in the next or future release this is what you have to do:

Copy the FindHDF5.cmake file from the current CMake distribution that you are using and place it somewhere in your project folder, say $ {PROJECT_ROOT}/Resources/CMake/Modules.

Then in your CMakeLists.txt file use the following line somewhere BEFORE you start looking for your libraries:

set (CMAKE_MODULES_DIR ${PROJECT_SOURCE_DIR}/Resources/CMake/Modules $ {CMAKE_MODULE_PATH})

Now, edit the FindHDF5.cmake file (the one that you copied into your project) to remove the offending lines/fix the bug. The above line will effectively substitute your corrected version for the one that ships with cmake. When CMake has a release where the bug is fixed then you can remove this workaround.

If your fix is general enough attach the corrected file to the bug report.

Cheers.
___________________________________________________________
Mike Jackson                      www.bluequartz.net

On Sep 1, 2010, at 9:56 AM, James C. Sutherland wrote:

FYI, I just replicated this on Mac OSX 10.6.4 with HDF5 1.8.2 and CMake 2.8.1. If I do not have the "hl" libs installed things break with the same message on the configure step.
James


On Wed, Sep 1, 2010 at 7:51 AM, James C. Sutherland <[email protected] > wrote:
OS: Linux
CMake: 2.8.0
HDF5: 1.6.3 (yep - that old. I will pester the sysadmins for an update, but that won't likely solve the problem since the directory structure didn't really change in the move to 1.8.x as far as I can tell)

I filed a bug report: #0011195  

Let me know if you need any other information in diagnosing the problem.

James




On Wed, Sep 1, 2010 at 7:30 AM, Michael Jackson <[email protected] > wrote: So there is probably a bug in the FindHDF5.cmake file plain and simple. Can you file a bug report with CMake?

What version of HDF5 are you using? What version of CMake are you using? What platform are you running on
___________________________________________________________
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       [email protected]
BlueQuartz Software               Dayton, Ohio


On Sep 1, 2010, at 9:17 AM, James C. Sutherland wrote:

I was aware of the CMake build for the newer HDF5 releases.

However, I need this to work for users who are not able/willing to build their own hdf5 libraries from source. Also, it is certainly not a very good option to ask a user to move to a CMake build system and then tell them to hack on a FindHDF5.cmake file just to get a proper link line. Autotools users scoff at that and tell me that "CMake is too opaque to be usable."

There should be a way of getting this to work...?

James



On Wed, Sep 1, 2010 at 6:27 AM, Biddiscombe, John A. <[email protected]> wrote: The latest 1.8.5.x release branch of svn is CMake friendly and you shouldn’t have this trouble is you’re willing to recompile/install it


Something along these lines will work for an installation on win32 into /program file/HDF5


FIND_PACKAGE(HDF5 "1.8.5" REQUIRED NO_MODULE PATHS "$ENV{ProgramFiles}/HDF5")


[To fix the problem on the systems without re-installing, just remove references to hdf5_hl from the FindHDF5 stuff in your cmake installation module]


JB


From: [email protected] [mailto:[email protected]] On Behalf Of James C. Sutherland
Sent: 01 September 2010 00:45
To: cmake
Subject: [CMake] FindHDF5.cmake and the "hl" versions of hdf5 libs


I typically have full HDF5 installations on my systems but am now going to a system where the "hl" versions of the hdf5 libraries are not installed.

Although I don't need these, it appears that CMake is unwilling to let me proceed without them. I get the following error:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files:
HDF5_hdf5_hl_LIBRARY_DEBUG (ADVANCED)
linked by target "tabprops" in directory /uufs/chpc.utah.edu/ common/home/u0033394/TabProps/tabprops
HDF5_hdf5_hl_LIBRARY_RELEASE (ADVANCED)
linked by target "tabprops" in directory /uufs/chpc.utah.edu/ common/home/u0033394/TabProps/tabprops


By the way, the installed libraries are found:

-- Found HDF5: debug;HDF5_hdf5_hl_LIBRARY_DEBUG-NOTFOUND;/uufs/ chpc.utah.edu/sys/pkg/hdf5/5-1.6.3-amdopteron/lib/libhdf5.a;/uufs/ chpc.utah.edu/sys/pkg/hdf5/5-1.6.3-amdopteron/lib/ libhdf5_cpp.a;optimized;HDF5_hdf5_hl_LIBRARY_RELEASE-NOTFOUND;/uufs/ chpc.utah.edu/sys/pkg/hdf5/5-1.6.3-amdopteron/lib/libhdf5.a;/uufs/ chpc.utah.edu/sys/pkg/hdf5/5-1.6.3-amdopteron/lib/libhdf5_cpp.a


My CMakeLists.txt file has the following:

set( HDF5_USE_STATIC_LIBRARIES 1 )
find_package( HDF5 COMPONENTS C CXX )


Any idea of how to get fix this problem?

James



_______________________________________________
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



_______________________________________________
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

Reply via email to