mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
FindMPI: Choose definitions for MPI_CXX_SKIP_MPICXX before first use
Fixes: #22391
This commit is contained in:
@@ -1443,6 +1443,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
|
||||
set(MPI_CXX_SKIP_MPICXX FALSE CACHE BOOL "If true, the MPI-2 C++ bindings are disabled using definitions.")
|
||||
mark_as_advanced(MPI_CXX_SKIP_MPICXX)
|
||||
endif()
|
||||
_MPI_adjust_compile_definitions(${LANG})
|
||||
if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_COMPILER_INCLUDE_DIRS)))
|
||||
set(MPI_${LANG}_TRIED_IMPLICIT FALSE)
|
||||
set(MPI_${LANG}_WORKS_IMPLICIT FALSE)
|
||||
@@ -1547,7 +1548,6 @@ foreach(LANG IN ITEMS C CXX Fortran)
|
||||
endif()
|
||||
_MPI_assemble_libraries(${LANG})
|
||||
|
||||
_MPI_adjust_compile_definitions(${LANG})
|
||||
# We always create imported targets even if they're empty
|
||||
_MPI_create_imported_target(${LANG})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user