Merge topic 'FindMPI-option-MPI_CXX_SKIP_MPICXX'

1a9ebd1694 FindMPI: Honor MPI_CXX_SKIP_MPICXX when set as a normal variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6315
This commit is contained in:
Brad King
2021-07-07 13:35:46 +00:00
committed by Kitware Robot

View File

@@ -1440,7 +1440,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
endif()
if(_MPI_FIND_${LANG})
if( ${LANG} STREQUAL CXX AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS )
set(MPI_CXX_SKIP_MPICXX FALSE CACHE BOOL "If true, the MPI-2 C++ bindings are disabled using definitions.")
option(MPI_CXX_SKIP_MPICXX "If true, the MPI-2 C++ bindings are disabled using definitions." FALSE)
mark_as_advanced(MPI_CXX_SKIP_MPICXX)
endif()
if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_COMPILER_INCLUDE_DIRS)))