Cleaned up endif/else-s in CMakeLists.txt and *.cmake files
[alexxy/gromacs.git] / cmake / gmxManageMPI.cmake
index 735ebf352b102251a6a544bd620a54551d1a838a..5adc2627cdf2f49f17237a8d209ce3c7ee4575a7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -39,7 +39,7 @@ if(GMX_MPI)
     message(STATUS "MPI is not compatible with thread-MPI. Disabling thread-MPI.")
     set(GMX_THREAD_MPI OFF CACHE BOOL
         "Build a thread-MPI-based multithreaded version of GROMACS (not compatible with MPI)" FORCE)
-  endif(GMX_THREAD_MPI)
+  endif()
 
   # Test the CMAKE_C_COMPILER for being an MPI (wrapper) compiler
   TRY_COMPILE(MPI_FOUND ${CMAKE_BINARY_DIR}
@@ -146,12 +146,12 @@ if(GMX_MPI)
         mark_as_advanced(file_cmd)
     endif()
 
-  else(MPI_FOUND)
+  else()
       message(FATAL_ERROR
         "MPI support requested, but no MPI compiler found. Either set the "
         "C-compiler (CMAKE_C_COMPILER) to the MPI compiler (often called mpicc), "
         "or set the variables reported missing for MPI_C above.")
-  endif(MPI_FOUND)
+  endif()
 
   include(gmxTestCatamount)
   gmx_test_catamount(GMX_CRAY_CATAMOUNT)
@@ -163,4 +163,4 @@ if(GMX_MPI)
 
   set(GMX_LIB_MPI 1)
   set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_LIB_MPI")
-endif(GMX_MPI)
+endif()