Skip to content

FindMPI: Choose definitions for MPI_CXX_SKIP_MPICXX before first use

Ye Luo requested to merge ye-luo/cmake:adjust-compile-definitions-early into master

deprecated C++ binding source code include can be problematic for try_compile. When MPI_CXX_SKIP_MPICXX=true is requested, all the skip compile definitions should be added unconditionally. Move _MPI_adjust_compile_definitions before the first call (L1454) to _MPI_check_lang_works occurs.

Without this change, the _MPI_check_lang_works at L1454 fails in a build with CMAKE_CXX_FLAGS="-Werror -Wsuggest-override"

Fixes: #22391 (closed)
Topic-rename: FindMPI-adjust-compile-definitions-early

Edited by Brad King

Merge request reports