TriBITS icon indicating copy to clipboard operation
TriBITS copied to clipboard

find TPL hdf5 list of libs

Open bathmatt opened this issue 9 years ago • 4 comments

@nschloe @bartlettroscoe should hdf5 automatically include -lhdf5_hl -lhdf5

and often hdf5 requires a -ldl. Should that be there as well? dir-bin (gcc) 5 $ nm $HDF_BASE_DIR/lib/libhdf5.a | grep dl U dlclose U dlerror U dlopen U dlsym

bathmatt avatar Feb 19 '16 18:02 bathmatt

@bathmatt, thanks for creating this.

@nschloe, do you have an opinion on this?

I am fine with changing the default personally. The question is how to update the call to FIND_PACAKGE(HDF5) to comply. For advanced users that know exactly what they want to link against for a particular platform, they just set HDF5_LIBRARY_NAMES="<name0>;<name1>;... and then they get what they want. That is what CASL VERA does for its builds (takes nothing to chance).

bartlettroscoe avatar Feb 19 '16 19:02 bartlettroscoe

often hdf5 requires a -ldl.

The HDF5 config tells you whether or not you need that, and CMake should actually pick it up automatically. That's a key idea of CMake: Only worry about your direct dependencies. Including more than what's necessary has often led to problems in the past.

nschloe avatar Feb 19 '16 19:02 nschloe

OK, then it doesn't seem to at least. Ihave to specify it by hand. This is on hansen for instance.

bathmatt avatar Feb 19 '16 19:02 bathmatt

Is there an HDF5Config.cmake file that gets installed with HDF5? That would be great.

bartlettroscoe avatar Apr 20 '16 23:04 bartlettroscoe