[cmake-developers] [CMake] CMake 2.8.12-rc2 FindHDF5 issues

Clinton Stimpson clinton at elemtech.com
Tue Sep 17 18:16:42 EDT 2013


On Tuesday, September 17, 2013 04:01:30 PM Orion Poplawski wrote:
> On 09/16/2013 09:58 PM, clinton at elemtech.com wrote:
> > Same here... and this looks like a regression:
> > 
> > A simple CMakeLists.txt like this can reproduce it.
> > 
> > set(CMAKE_BUILD_TYPE Debug)
> > find_package(HDF5 COMPONENTS C HL REQUIRED)
> > add_executable(foo foo.cpp)
> > target_link_libraries(foo ${HDF5_LIBRARIES})
> > 
> > FindHDF5.cmake misuses CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES when
> > assembling the HDF5_LIBRARIES variable.  If I clear out the
> > CMAKE_BUILD_TYPE variable, then the problem goes away.
> > 
> > Clint
> 
> cmake 2.8.11.2:
> 
> -- Found HDF5:
> debug;/usr/lib64/libz.so;debug;/usr/lib64/libdl.so;debug;/usr/lib64/libm.so;
> debug;/usr/lib64/libhdf5_hl.so;debug;/usr/lib64/libhdf5.so;optimized;/usr/li
> b64/libz.so;optimized;/usr/lib64/libdl.so;optimized;/usr/lib64/libm.so;optim
> ized;/usr/lib64/libhdf5_hl.so;optimized;/usr/lib64/libhdf5.so
> 
> cmake 2.8.12-rc2:
> 
> -- Found HDF5:
> debug;HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND;debug;HDF5_z_LIBRARY_DEBUG-NOTFOUND;d
> ebug;HDF5_dl_LIBRARY_DEBUG-NOTFOUND;debug;HDF5_m_LIBRARY_DEBUG-NOTFOUND;debu
> g;HDF5_hdf5_hl_LIBRARY_DEBUG-NOTFOUND;debug;HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
> ;optimized;/usr/lib64/libz.so;optimized;/usr/lib64/libdl.so;optimized;/usr/l
> ib64/libm.so;optimized;/usr/lib64/libhdf5_hl.so;optimized;/usr/lib64/libhdf5
> .so
> 
> 
> In comparing the CMakeCache:
[ snip ]
> 
> As Rolf noted, FindHDF5 has not changed.

Right, it hasn't changed.

I've narrowed it down to a regression caused by 04d4dc33.
Will Dicharry, is this something you can look at?  You are the maintainer for 
both FindHDF5 and SelectLibraryConfigurations.  A change in 
SelectLibraryConfigurations caused a break in FindHDF5.

Clint




More information about the cmake-developers mailing list