From 964d63644d0cb8c8a0d083a1bbf0a7e3a39d3598 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 12 Jul 2013 23:58:56 +0000 Subject: [PATCH] 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 --- deal.II/cmake/configure/configure_1_mpi.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) -- 2.39.5