diff --git a/CMake/patches/FindMPI.cmake b/CMake/patches/FindMPI.cmake new file mode 100644 index 000000000..192c280fd --- /dev/null +++ b/CMake/patches/FindMPI.cmake @@ -0,0 +1,18 @@ +##============================================================================= +## +## 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. +## +##============================================================================= + +# This module is already included in new versions of CMake +if(CMAKE_VERSION VERSION_LESS 3.15) + include(${CMAKE_CURRENT_LIST_DIR}/3.15/FindMPI.cmake) +else() + include(${CMAKE_ROOT}/Modules/FindMPI.cmake) +endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index a06ac2311..42f9a6a27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -294,9 +294,14 @@ if(NOT VTKm_INSTALL_ONLY_LIBRARIES) FILES ${VTKm_SOURCE_DIR}/CMake/VTKmCMakeBackports.cmake ${VTKm_SOURCE_DIR}/CMake/FindTBB.cmake - ${VTKm_SOURCE_DIR}/CMake/patches/3.15/FindMPI.cmake + ${VTKm_SOURCE_DIR}/CMake/patches/FindMPI.cmake DESTINATION ${VTKm_INSTALL_CMAKE_MODULE_DIR} ) + install( + FILES + ${VTKm_SOURCE_DIR}/CMake/patches/3.15/FindMPI.cmake + DESTINATION ${VTKm_INSTALL_CMAKE_MODULE_DIR}/3.15 + ) # Install support files. install(