Add MPI as a dependency.

Adding option to enable MPI. When enabled, we do `find_package(MPI)` in
the Base component itself.
This commit is contained in:
Utkarsh Ayachit 2017-11-28 15:32:00 -05:00
parent e72ce1e141
commit 9dfc6f814e
3 changed files with 9 additions and 0 deletions

@ -63,6 +63,7 @@ set(VTKm_ENABLE_CUDA "@VTKm_ENABLE_CUDA@")
set(VTKm_ENABLE_TBB "@VTKm_ENABLE_TBB@") set(VTKm_ENABLE_TBB "@VTKm_ENABLE_TBB@")
set(VTKm_ENABLE_OSMESA "@VTKm_ENABLE_OSMESA@") set(VTKm_ENABLE_OSMESA "@VTKm_ENABLE_OSMESA@")
set(VTKm_ENABLE_RENDERING "@VTKm_ENABLE_RENDERING@") set(VTKm_ENABLE_RENDERING "@VTKm_ENABLE_RENDERING@")
set(VTKm_ENABLE_MPI "@VTKm_ENABLE_MPI@")
# Load the library exports, but only if not compiling VTK-m itself # Load the library exports, but only if not compiling VTK-m itself
set_and_check(VTKm_CONFIG_DIR "@PACKAGE_VTKm_INSTALL_CONFIG_DIR@") set_and_check(VTKm_CONFIG_DIR "@PACKAGE_VTKm_INSTALL_CONFIG_DIR@")

@ -104,6 +104,13 @@ macro(vtkm_configure_component_Base)
include(VTKmCompilerOptimizations) include(VTKmCompilerOptimizations)
endif() endif()
# For now, MPI support is a compile time option.
if (VTKm_ENABLE_MPI)
if (NOT MPI_C_FOUND)
find_package(MPI ${VTKm_FIND_PACKAGE_QUIETLY})
endif()
endif()
# Check for the existance of the base vtkm target # Check for the existance of the base vtkm target
if (TARGET vtkm) if (TARGET vtkm)
set(VTKm_base_vtkm_target_FOUND True) set(VTKm_base_vtkm_target_FOUND True)

@ -119,6 +119,7 @@ option(VTKm_ENABLE_RENDERING "Enable rendering library" ON)
option(VTKm_ENABLE_TESTING "Enable VTKm Testing" ON) option(VTKm_ENABLE_TESTING "Enable VTKm Testing" ON)
option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF) option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF)
option(VTKm_ENABLE_OSMESA "Enable creating the OSMesa canvas" OFF) option(VTKm_ENABLE_OSMESA "Enable creating the OSMesa canvas" OFF)
option(VTKm_ENABLE_MPI "Enable MPI support" OFF)
option(VTKm_ENABLE_DOCUMENTATION "Build Doxygen documentation" OFF) option(VTKm_ENABLE_DOCUMENTATION "Build Doxygen documentation" OFF)
option(VTKm_ENABLE_EXAMPLES "Build examples" OFF) option(VTKm_ENABLE_EXAMPLES "Build examples" OFF)