diff options
author | Brad King <brad.king@kitware.com> | 2021-02-12 11:53:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-02-12 11:53:41 (GMT) |
commit | a86cd9cb3c13e109cf820136eacea5883122ae75 (patch) | |
tree | 1b65593b12b054f3c5f36fa4d1947d4c63928eef | |
parent | ea11c13259dd371725db9eeffd2b4dce1a6c58a4 (diff) | |
parent | 8251b62ba0165526eaca9e949ee28860af82521f (diff) | |
download | CMake-a86cd9cb3c13e109cf820136eacea5883122ae75.zip CMake-a86cd9cb3c13e109cf820136eacea5883122ae75.tar.gz CMake-a86cd9cb3c13e109cf820136eacea5883122ae75.tar.bz2 |
Merge topic 'FindMPI-lang-reason' into release-3.20
8251b62ba0 FindMPI: Fix reason for a non-enabled non-requested language
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5801
-rw-r--r-- | Modules/FindMPI.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 8cc39ac..195ca49 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1428,7 +1428,9 @@ 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. ") + 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 ) |