mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 10:35:42 +00:00
fb6235e0e9
Previously an installed version of VTK-m wasn't relocatable as it had system MPI paths. Additionally the installed vtkm_diy target would depend on MPI but not `find_package(MPI)`
22 lines
852 B
CMake
22 lines
852 B
CMake
##============================================================================
|
|
## Copyright (c) Kitware, Inc.
|
|
## All rights reserved.
|
|
## See LICENSE.txt for details.
|
|
##
|
|
## This software is distributed WITHOUT ANY WARRANTY; without even
|
|
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
## PURPOSE. See the above copyright notice for more information.
|
|
##============================================================================
|
|
|
|
if(VTKm_ENABLE_MPI AND NOT TARGET MPI::MPI_CXX)
|
|
if(CMAKE_VERSION VERSION_LESS 3.10)
|
|
find_package(MPI REQUIRED MODULE)
|
|
else()
|
|
#clunky but we need to make sure we use the upstream module if it exists
|
|
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
|
set(CMAKE_MODULE_PATH "")
|
|
find_package(MPI MODULE)
|
|
set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})
|
|
endif()
|
|
endif()
|