File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/examples/using-with-cmake-mpi Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,14 @@ endif()
5858#
5959find_package (Conduit REQUIRED
6060 NO_DEFAULT_PATH
61- PATHS ${CONDUIT_DIR} /lib/cmake/conduit)
61+ PATHS ${CONDUIT_DIR} /lib/cmake/conduit
62+ COMPONENTS MPI)
6263
63- # make sure we have mpi, since we are going to use
64- # conduits mpi features
65- if (NOT MPI_FOUND)
66- find_package (MPI COMPONENTS C)
64+ if (NOT Conduit_MPI_FOUND)
65+ message (STATUS "This example requires an MPI-enabled Conduit" )
66+ return ()
6767endif ()
6868
69-
7069################################################################
7170# Option 2: import conduit using find_package search
7271################################################################
@@ -91,8 +90,7 @@ add_executable(conduit_mpi_example conduit_mpi_example.cpp)
9190
9291# link to conduit targets
9392target_link_libraries (conduit_mpi_example conduit::conduit
94- conduit::conduit_mpi
95- MPI::MPI_C)
93+ conduit::conduit_mpi)
9694
9795# if you are using conduit's python CAPI capsule interface
9896# target_link_libraries(conduit_mpi_example conduit::conduit_python)
You can’t perform that action at this time.
0 commit comments