Hi, 
I'm experiencing troubles with cmake 3.6.2 and FindHDF5.cmake module in 
Debian/Testing. 
I'm trying to build med-fichier and gmsh for instance. 



The main CMakeList.txt contains: 

find_package(HDF5 COMPONENTS C) 
MESSAGE("HDF5_C_INCLUDE_DIR=${HDF5_C_INCLUDE_DIR}") 
MESSAGE("HDF5_CXX_INCLUDE_DIR=${HDF5_CXX_INCLUDE_DIR}") 
MESSAGE("HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") 
MESSAGE("HDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}") 
MESSAGE("HDF5_LIBRARIES=${HDF5_LIBRARIES}") 
MESSAGE("HDF5_C_LIBRARIES=${HDF5_C_LIBRARIES}") 


For those two using something like cmake .. -DHDF5_PREFER_PARALLEL:BOOL=ON to 
force the use of the mpi version 
I end up with error like that: 



-- HDF5: Using hdf5 compiler wrapper to determine C configuration 
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS 
HDF5_HL_LIBRARIES) 
HDF5_C_INCLUDE_DIR=HDF5_C_INCLUDE_DIR-NOTFOUND 
HDF5_CXX_INCLUDE_DIR=HDF5_CXX_INCLUDE_DIR-NOTFOUND 
HDF5_INCLUDE_DIR= 
HDF5_INCLUDE_DIRS=HDF5_C_INCLUDE_DIR-NOTFOUND;HDF5_CXX_INCLUDE_DIR-NOTFOUND 
HDF5_LIBRARIES=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;HDF5_hdf5_LIBRARY-NOTFOUND;HDF5_hdf5_cpp_LIBRARY-NOTFOUND;HDF5_hdf5_LIBRARY-NOTFOUND
 
HDF5_C_LIBRARIES=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;HDF5_hdf5_LIBRARY-NOTFOUND
 
-- HDF5 not found 




whereas hdf5 is installed!! 


I also tried to see what happens in FindHDF5.cmake by printing some additionnal 
messages: 



-- HDF5: Using hdf5 compiler wrapper to determine C configuration 
HDF5_C_INCLUDE_DIRS = /usr/include/hdf5/openmpi;/usr/include/hdf5/openmpi 
HDF5_C_DEFINITIONS 
=-D_LARGEFILE64_SOURCE;-D_LARGEFILE_SOURCE;-D_FORTIFY_SOURCE=2;-D_LARGEFILE64_SOURCE;-D_LARGEFILE_SOURCE;-D_FORTIFY_SOURCE=2
 
HDF5_C_LIBRARY_DIRS = /usr/lib/x86_64-linux-gnu/hdf5/openmpi 
HDF5_C_LIBRARY_NAMES = hdf5;sz;z;dl;m 
HDF5_C_HL_LIBRARY_NAMES = hdf5_hl 
HDF5_C_HL_LIBRARIES = /usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5_hl.so 
HDF5_C_IS_PARALLEL=TRUE 
HDF5_IS_PARALLEL=FALSE 
CMake Warning at /usr/share/cmake-3.6/Modules/FindHDF5.cmake:613 (message): 
HDF5 found for language C is parallel but previously found language is not 
parallel. 
Call Stack (most recent call first): 
CMakeLists.txt:853 (find_package) 




It seems to me that HDF5_IS_PARALLEL is never set before... 

Is there a proper new way to find hdf5 with cmake? 
What is the problem with my actual way of doing it? 

Thanks for any help 
Best 

Christophe TROPHIME 
Research Engineer 

CNRS - LNCMI 
25, rue des Martyrs 
BP 166 
38042 GRENOBLE Cedex 9 
FRANCE 

Tel : +33 (0)4 76 88 90 02 
Fax : +33 (0) 4 76 88 10 01 
Office U 19 
M@il : christophe.troph...@lncmi.cnrs.fr 

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to