Quantcast

trouble with hdf5-1.8.17 cmake

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

trouble with hdf5-1.8.17 cmake

Biddiscombe, John A.

After installing hdf5-1.8.17 using a cmake build I am using

 

find_package(HDF5 COMPONENTS CXX C NO_MODULE REQUIRED static)

 

and target_link_libraries(my_target .... ${HDF5_EXPORT_LIBRARIES})

but my link fails with

/usr/bin/ld.x: cannot find -lhdf5_hl_cpp-shared}

 

which is clearly wrong since I didn’t ask for HL in my components and I did ask for static, not shared

 

If I’m not supposed to use the catch all variable ${HDF5_EXPORT_LIBRARIES}, then what should I use?

 

If I ask for

target_link_libraries(my_target hdf5 hdf5_cpp)

it fails with cannot find -lhdf5

 

if I ask for (the actual target names declared as inport in the hdf5-config.cmake)

target_link_libraries(my_target hdf5-static hdf5_cpp-static)

it fails with cannot find -lhdf5-static

 

Cmake does not seem to be resolving the target correctly

What is the correct target name to use?

 

thanks

 

JB

 

 

 

--

John Biddiscombe,                        email:biddisco @.at.@ cscs.ch

http://www.cscs.ch/

CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07

Via Trevano 131, 6900 Lugano, Switzerland   | Fax:  +41 (91) 610.82.82

 


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: trouble with hdf5-1.8.17 cmake

Biddiscombe, John A.

Sorry for the noise. I have fixed this, it was being caused by a stray “}” in one of my target_link_library commands. why it affected the hdf5 libs I have no idea, but using ${HDF5_EXPORT_LIBRARIES} seems to be ok now

 

JB

 

 

 

From: Hdf-forum [mailto:[hidden email]] On Behalf Of Biddiscombe, John A.
Sent: 05 October 2016 15:26
To: [hidden email]
Subject: [Hdf-forum] trouble with hdf5-1.8.17 cmake

 

After installing hdf5-1.8.17 using a cmake build I am using

 

find_package(HDF5 COMPONENTS CXX C NO_MODULE REQUIRED static)

 

and target_link_libraries(my_target .... ${HDF5_EXPORT_LIBRARIES})

but my link fails with

/usr/bin/ld.x: cannot find -lhdf5_hl_cpp-shared}

 

which is clearly wrong since I didn’t ask for HL in my components and I did ask for static, not shared

 

If I’m not supposed to use the catch all variable ${HDF5_EXPORT_LIBRARIES}, then what should I use?

 

If I ask for

target_link_libraries(my_target hdf5 hdf5_cpp)

it fails with cannot find -lhdf5

 

if I ask for (the actual target names declared as inport in the hdf5-config.cmake)

target_link_libraries(my_target hdf5-static hdf5_cpp-static)

it fails with cannot find -lhdf5-static

 

Cmake does not seem to be resolving the target correctly

What is the correct target name to use?

 

thanks

 

JB

 

 

 

--

John Biddiscombe,                        email:biddisco @.at.@ cscs.ch

http://www.cscs.ch/

CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07

Via Trevano 131, 6900 Lugano, Switzerland   | Fax:  +41 (91) 610.82.82

 


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Loading...