This change should also be backward compatible to older CMake versions.
(Fingers crossed.)
MESSAGE(STATUS " ${_feature}_VERSION: ${${_feature}_VERSION}")
ENDIF()
- SET(${_feature}_FOUND TRUE)
+ #
+ # Respect a possible ${_feature}_FOUND variable that is set to a truth
+ # value. We need this for modern™ MPI detection where CMake's
+ # FindMPI.cmake might only set MPI_FOUND to true and nothing else.
+ #
+ IF(NOT DEFINED ${_feature}_FOUND)
+ SET(${_feature}_FOUND TRUE)
+ ENDIF()
SET(_variable ${_var})
SET(${_feature}_${_variable} "")
DEAL_II_PACKAGE_HANDLE(MPI
LIBRARIES
- REQUIRED MPI_CXX_LIBRARIES
- OPTIONAL MPI_Fortran_LIBRARIES MPI_C_LIBRARIES
+ OPTIONAL MPI_CXX_LIBRARIES MPI_Fortran_LIBRARIES MPI_C_LIBRARIES
INCLUDE_DIRS
- REQUIRED MPI_CXX_INCLUDE_PATH
- OPTIONAL MPI_C_INCLUDE_PATH
+ OPTIONAL MPI_CXX_INCLUDE_PATH MPI_C_INCLUDE_PATH
USER_INCLUDE_DIRS
- REQUIRED MPI_CXX_INCLUDE_PATH
- OPTIONAL MPI_C_INCLUDE_PATH
+ OPTIONAL MPI_CXX_INCLUDE_PATH MPI_C_INCLUDE_PATH
CXX_FLAGS OPTIONAL MPI_CXX_COMPILE_FLAGS
LINKER_FLAGS OPTIONAL MPI_CXX_LINK_FLAGS
CLEAR
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams