]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/flann/fix-dependency-hdf5.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / flann / fix-dependency-hdf5.patch
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 7ff331a..155cabe 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -75,11 +75,17 @@ if (NOT PYTHON_EXECUTABLE)
6 endif()
7 endif()
8
9 +if (WITH_HDF5)
10 find_hdf5()
11 -if (NOT HDF5_FOUND)
12 - message(WARNING "hdf5 library not found, some tests will not be run")
13 +if (NOT hdf5_FOUND)
14 + message(ERROR "hdf5 library not found")
15 else()
16 - include_directories(${HDF5_INCLUDE_DIR})
17 + if (TARGET hdf5::hdf5-shared)
18 + link_libraries(hdf5::hdf5-shared)
19 + elseif (TARGET hdf5::hdf5-static)
20 + link_libraries(hdf5::hdf5-static)
21 + endif()
22 +endif()
23 endif()
24
25 if (USE_MPI OR HDF5_IS_PARALLEL)
26 diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake
27 index 8aef8e0..747414f 100644
28 --- a/cmake/flann_utils.cmake
29 +++ b/cmake/flann_utils.cmake
30 @@ -21,21 +21,8 @@ endmacro(DISSECT_VERSION)
31
32 # workaround a FindHDF5 bug
33 macro(find_hdf5)
34 - find_package(HDF5)
35 -
36 - set( HDF5_IS_PARALLEL FALSE )
37 - foreach( _dir ${HDF5_INCLUDE_DIRS} )
38 - if( EXISTS "${_dir}/H5pubconf.h" )
39 - file( STRINGS "${_dir}/H5pubconf.h"
40 - HDF5_HAVE_PARALLEL_DEFINE
41 - REGEX "HAVE_PARALLEL 1" )
42 - if( HDF5_HAVE_PARALLEL_DEFINE )
43 - set( HDF5_IS_PARALLEL TRUE )
44 - endif()
45 - endif()
46 - endforeach()
47 - set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
48 - "HDF5 library compiled with parallel IO support" )
49 + find_package(hdf5 CONFIG)
50 + set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL})
51 mark_as_advanced( HDF5_IS_PARALLEL )
52 endmacro(find_hdf5)
53