Skip to content

Commit 2765dd3

Browse files
mathstufkwrobot
authored andcommitted
Merge topic 'hdf5_linking_for_CGNSReader' into next
0f2fdb3 add vtkMPI b17ca4c use vtkhdf5 module to link against hdf5 library
2 parents 6785c10 + 0f2fdb3 commit 2765dd3

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Plugins/CGNSReader/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if (NOT CGNS_FOUND)
1010
message(FATAL_ERROR "Unable to locate CGNS library.")
1111
endif()
1212

13+
vtk_module_load(vtkhdf5)
1314
#
1415
include_directories(${CGNS_INCLUDE_DIR})
1516

@@ -58,6 +59,10 @@ vtkCGNSReader.cxx
5859
vtkCGNSReader.h
5960
)
6061

62+
if(PARAVIEW_USE_MPI)
63+
include(vtkMPI)
64+
endif()
65+
6166
# ---------------------------------------------------------------------------
6267
# Combined plugin
6368
# -----------------------------------------------------------------------------
@@ -78,15 +83,19 @@ else()
7883
SERVER_MANAGER_SOURCES ${SOURCES})
7984
endif()
8085

81-
set(CGNS_LINK_TO_HDF5 ON CACHE BOOL "use -lhdf5 for linking cgns to hdf5" )
86+
set(CGNS_LINK_TO_HDF5 ON CACHE BOOL "use vtkhdf5_LIBRARIES for linking cgns to hdf5" )
8287
mark_as_advanced(CGNS_LINK_TO_HDF5)
8388

8489
target_link_libraries(CGNSReader LINK_PRIVATE vtksys ${CGNS_LIBRARIES})
8590
if (CGNS_LINK_TO_HDF5)
86-
target_link_libraries(CGNSReader LINK_PRIVATE -lhdf5)
91+
target_link_libraries(CGNSReader LINK_PRIVATE ${vtkhdf5_LIBRARIES})
8792
endif()
8893

8994
# Add testing if necessary
9095
if (BUILD_TESTING)
9196
add_subdirectory(Testing)
9297
endif()
98+
99+
if(PARAVIEW_USE_MPI)
100+
vtk_mpi_link(CGNSReader)
101+
endif()

0 commit comments

Comments
 (0)