Commit cc4a256d authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Examples/Catalyst: bail if MPI cannot be found

This allows the examples-against-an-install-tree test succeed.
parent 8f7b1b1f
...@@ -27,7 +27,13 @@ if (USE_CATALYST) ...@@ -27,7 +27,13 @@ if (USE_CATALYST)
# FIXME: This should really be fixed to instead be done per-target. # FIXME: This should really be fixed to instead be done per-target.
add_definitions(-DUSE_CATALYST) add_definitions(-DUSE_CATALYST)
else () else ()
find_package(MPI REQUIRED COMPONENTS C) find_package(MPI COMPONENTS C)
if (NOT MPI_FOUND)
message(STATUS
"${CMAKE_PROJECT_NAME} requires MPI support, but none was found. "
"Skipping ${CMAKE_PROJECT_NAME} examples.")
return ()
endif ()
endif () endif ()
option(BUILD_TESTING "Build Testing" OFF) option(BUILD_TESTING "Build Testing" OFF)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment