mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
Merge topic 'FindMPI-improve-error'
e221039e11 FindMPI: Improve error when a component's language is not enabled
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !4071
This commit is contained in:
@@ -1391,6 +1391,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
|
||||
endif()
|
||||
else()
|
||||
set(_MPI_FIND_${LANG} FALSE)
|
||||
string(APPEND _MPI_FAIL_REASON "MPI component '${LANG}' was requested, but language ${LANG} is not enabled. ")
|
||||
endif()
|
||||
if(_MPI_FIND_${LANG})
|
||||
if( ${LANG} STREQUAL CXX AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS )
|
||||
@@ -1688,6 +1689,7 @@ endif()
|
||||
find_package_handle_standard_args(MPI
|
||||
REQUIRED_VARS ${_MPI_REQ_VARS}
|
||||
VERSION_VAR ${_MPI_MIN_VERSION}
|
||||
REASON_FAILURE_MESSAGE "${_MPI_FAIL_REASON}"
|
||||
HANDLE_COMPONENTS)
|
||||
|
||||
#=============================================================================
|
||||
|
||||
Reference in New Issue
Block a user