]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure to set default values for MPI_VERSION_* 6615/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 16 May 2018 23:14:47 +0000 (01:14 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 16 May 2018 23:21:17 +0000 (01:21 +0200)
cmake/modules/FindMPI.cmake

index cbe43f7f133931f4d6f84b31c74a9149721dba77..ef9692a8a1dd8f42108817d787ec8f1f1ca3cc32 100644 (file)
@@ -109,20 +109,19 @@ IF(NOT MPI_MPI_H MATCHES "-NOTFOUND" AND NOT DEFINED MPI_VERSION)
     MPI_VERSION_MINOR "${MPI_VERSION_MINOR_STRING}"
     )
   SET(MPI_VERSION "${MPI_VERSION_MAJOR}.${MPI_VERSION_MINOR}")
+ENDIF()
 
-  #
-  # Except - this doesn't always work. Some distributions install a header
-  # stub mpi.h that includes the right mpi header depending on the
-  # architecture. In this case we are really out of luck. It is not
-  # straightforward to find the correct header file to query the version
-  # information from. Just set a very conservative default:
-  #
-  IF(MPI_VERSION STREQUAL ".")
-    SET(MPI_VERSION "0.0")
-    SET(MPI_VERSION_MAJOR "0")
-    SET(MPI_VERSION_MINOR "0")
-  ENDIF()
-
+#
+# Except - this doesn't always work. Some distributions install a header
+# stub mpi.h that includes the right mpi header depending on the
+# architecture. In this case we are really out of luck. It is not
+# straightforward to find the correct header file to query the version
+# information from. Just set a very conservative default:
+#
+IF(NOT DEFINED MPI_VERSION OR MPI_VERSION STREQUAL ".")
+  SET(MPI_VERSION "0.0")
+  SET(MPI_VERSION_MAJOR "0")
+  SET(MPI_VERSION_MINOR "0")
 ENDIF()
 
 DEAL_II_PACKAGE_HANDLE(MPI

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.