mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-11 20:11:10 -05:00
Merge topic 'findmpi_dont_variable_lang'
c9c2e040aa FindMPI: Don't check for variables named the same as the languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7208
This commit is contained in:
@@ -1452,21 +1452,21 @@ foreach(LANG IN ITEMS C CXX Fortran)
|
||||
if(CMAKE_${LANG}_COMPILER_LOADED)
|
||||
if(NOT MPI_FIND_COMPONENTS)
|
||||
set(_MPI_FIND_${LANG} TRUE)
|
||||
elseif( ${LANG} IN_LIST MPI_FIND_COMPONENTS)
|
||||
elseif( LANG IN_LIST MPI_FIND_COMPONENTS)
|
||||
set(_MPI_FIND_${LANG} TRUE)
|
||||
elseif( ${LANG} STREQUAL CXX AND NOT MPI_CXX_SKIP_MPICXX AND MPICXX IN_LIST MPI_FIND_COMPONENTS )
|
||||
elseif( "${LANG}" STREQUAL "CXX" AND NOT MPI_CXX_SKIP_MPICXX AND MPICXX IN_LIST MPI_FIND_COMPONENTS )
|
||||
set(_MPI_FIND_${LANG} TRUE)
|
||||
else()
|
||||
set(_MPI_FIND_${LANG} FALSE)
|
||||
endif()
|
||||
else()
|
||||
set(_MPI_FIND_${LANG} FALSE)
|
||||
if(${LANG} IN_LIST MPI_FIND_COMPONENTS)
|
||||
if(LANG IN_LIST MPI_FIND_COMPONENTS)
|
||||
string(APPEND _MPI_FAIL_REASON "MPI component '${LANG}' was requested, but language ${LANG} is not enabled. ")
|
||||
endif()
|
||||
endif()
|
||||
if(_MPI_FIND_${LANG})
|
||||
if( ${LANG} STREQUAL CXX AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS )
|
||||
if( "${LANG}" STREQUAL "CXX" AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS )
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user