From: Matthias Maier Date: Fri, 12 Jul 2013 23:58:56 +0000 (+0000) Subject: CMake: Bugfix: Clean up MPI_${_lang}_LIBRARIES if they are set to "-NOTFOUND". X-Git-Tag: v8.0.0~134 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=964d63644d0cb8c8a0d083a1bbf0a7e3a39d3598;p=dealii.git CMake: Bugfix: Clean up MPI_${_lang}_LIBRARIES if they are set to "-NOTFOUND". git-svn-id: https://svn.dealii.org/trunk@29988 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_1_mpi.cmake b/deal.II/cmake/configure/configure_1_mpi.cmake index 9f8585be2e..479b363af5 100644 --- a/deal.II/cmake/configure/configure_1_mpi.cmake +++ b/deal.II/cmake/configure/configure_1_mpi.cmake @@ -39,6 +39,7 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var) # SET_IF_EMPTY(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER}) SET_IF_EMPTY(MPI_C_COMPILER ${CMAKE_C_COMPILER}) # for good measure + SET_IF_EMPTY(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER}) # for good measure FIND_PACKAGE(MPI) IF(NOT MPI_CXX_FOUND) @@ -55,10 +56,20 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var) SET(MPI_FOUND) # clear this value so that FIND_PACKAGE runs again. UNSET(MPI_CXX_COMPILER CACHE) UNSET(MPI_C_COMPILER CACHE) + UNSET(MPI_Fortran_COMPILER CACHE) FIND_PACKAGE(MPI) ENDIF() ENDIF() + # + # Manually clean up variables: + # + FOREACH(_lang C CXX Fortran) + IF(MPI_${_lang}_LIBRARIES MATCHES "-NOTFOUND") + SET(MPI_${_lang}_LIBRARIES) + ENDIF() + ENDFOREACH() + IF(MPI_CXX_FOUND) # Hide some variables: MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY)