summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-28 13:37:17 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-28 13:37:23 (GMT)
commitd71d5551535e8f64348165017495b39f681ffacc (patch)
tree4426928c333078176c08331651bbc8b2a4bfc29b
parentd35f1c9beee14f1be1e39838b5d4be0906a48974 (diff)
parentc9c2e040aaf96540c22ba8cfd56fab87b4378bc5 (diff)
downloadCMake-d71d5551535e8f64348165017495b39f681ffacc.zip
CMake-d71d5551535e8f64348165017495b39f681ffacc.tar.gz
CMake-d71d5551535e8f64348165017495b39f681ffacc.tar.bz2
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
-rw-r--r--Modules/FindMPI.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index c974d33..6b60deb 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -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()