Skip to content

FindMPI: Improve error when a component's language is not enabled

Updated FindMPI.cmake to throw a more descriptive error if a component is requested but the language is not enabled.

Previously, if a CMake project requests a component for a language that is not enabled, it would simply give an error with the message Could NOT find MPI (missing: MPI_${LANG}_FOUND), which is not indicative that the language was not enabled. This change provides an error message indicating that it failed to find the particular MPI component because no compiler was available for the language and the language might need to be enabled for the project.

Closes: #19996 (closed)
Topic-rename: FindMPI-improve-error

Edited by Brad King

Merge request reports