mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
FindMPI: Honor MPI_CXX_SKIP_MPICXX when set as a normal variable
Express the cache entry with `option()`. In combination with policies CMP0077 and CMP0102, this allows project code to control the switch with a variable: ``` set(MPI_CXX_SKIP_MPICXX TRUE) find_package(MPI COMPONENTS CXX) ```
This commit is contained in:
@@ -1440,7 +1440,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
|
|||||||
endif()
|
endif()
|
||||||
if(_MPI_FIND_${LANG})
|
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 )
|
||||||
set(MPI_CXX_SKIP_MPICXX FALSE CACHE BOOL "If true, the MPI-2 C++ bindings are disabled using definitions.")
|
option(MPI_CXX_SKIP_MPICXX "If true, the MPI-2 C++ bindings are disabled using definitions." FALSE)
|
||||||
mark_as_advanced(MPI_CXX_SKIP_MPICXX)
|
mark_as_advanced(MPI_CXX_SKIP_MPICXX)
|
||||||
endif()
|
endif()
|
||||||
if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_COMPILER_INCLUDE_DIRS)))
|
if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_COMPILER_INCLUDE_DIRS)))
|
||||||
|
|||||||
Reference in New Issue
Block a user