]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Bugfix: Clean up MPI_${_lang}_LIBRARIES if they are set to "-NOTFOUND".
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Jul 2013 23:58:56 +0000 (23:58 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Jul 2013 23:58:56 +0000 (23:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@29988 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_1_mpi.cmake

index 9f8585be2e29cf0e61cf762696babac4fe7f1757..479b363af58b0f29347badb119e50c233cb4d391 100644 (file)
@@ -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)

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


Typeset in Trocchi and Trocchi Bold Sans Serif.