Cleaned up endif/else-s in CMakeLists.txt and *.cmake files
[alexxy/gromacs.git] / CMakeLists.txt
index 2c0482094602b215654e54d40c11e8e9adb90d01..8fcbfac8137dfbae5ce5bf3216434b597adbd733 100644 (file)
@@ -63,7 +63,7 @@ set(CUSTOM_VERSION_STRING ""
 mark_as_advanced(CUSTOM_VERSION_STRING)
 if (CUSTOM_VERSION_STRING)
     set(PROJECT_VERSION ${CUSTOM_VERSION_STRING})
-endif (CUSTOM_VERSION_STRING)
+endif()
 set(LIBRARY_SOVERSION 0)
 set(LIBRARY_VERSION ${LIBRARY_SOVERSION}.0.0)
 # It is a bit irritating, but this has to be set separately for now!
@@ -208,7 +208,7 @@ gmx_detect_target_architecture()
 if(GMX_CPU_ACCELERATION)
     # Stay compatible with old Jenkins command line options for specific SIMD acceleration
     set(GMX_SIMD "${GMX_CPU_ACCELERATION}" CACHE STRING "SIMD instruction set level and compiler optimization" FORCE)
-endif(GMX_CPU_ACCELERATION)
+endif()
 
 if(NOT GMX_TARGET_MIC)
     include(gmxDetectSimd)
@@ -321,10 +321,10 @@ set(PKG_CFLAGS "")
 if(GMX_DOUBLE)
     add_definitions(-DGMX_DOUBLE)
     set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_DOUBLE")
-endif(GMX_DOUBLE)
+endif()
 if(GMX_SOFTWARE_INVSQRT)
   set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_SOFTWARE_INVSQRT")
-endif(GMX_SOFTWARE_INVSQRT)
+endif()
 
 
 
@@ -415,7 +415,7 @@ mark_as_advanced(GMX_XML)
 #    include_directories(${LIBXML2_INCLUDE_DIR})
 #    set(PKG_XML libxml-2.0)
 #    set(XML_LIBRARIES ${LIBXML2_LIBRARIES})
-#endif(GMX_XML)
+#endif()
 
 option(GMX_GSL "Add support for gsl" OFF)
 if (GMX_GSL)
@@ -425,8 +425,8 @@ if (GMX_GSL)
     include_directories(${GSL_INCLUDE_DIR})
     set(PKG_GSL gsl)
     set(HAVE_LIBGSL 1)
-  endif(GSL_FOUND)
-endif (GMX_GSL)
+  endif()
+endif()
 
 option(GMX_X11 "Use X window system" OFF)
 if (GMX_X11)
@@ -439,7 +439,7 @@ if (GMX_X11)
                 "gmx view will not be available.")
     endif()
     include_directories(${X11_INCLUDE_DIR})
-endif(GMX_X11)
+endif()
 
 include(ThreadMPI)
 set(THREAD_MPI_LIB thread_mpi)
@@ -453,7 +453,7 @@ if(GMX_THREAD_MPI)
     set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_THREAD_MPI")
     set(GMX_MPI 1)
     set(MPI_IN_PLACE_EXISTS 1)
-endif(GMX_THREAD_MPI)
+endif()
 tmpi_get_source_list(THREAD_MPI_SRC)
 # If atomics are manually disabled a define is needed because atomics.h doesn't depend on config.h
 if (TMPI_ATOMICS_DISABLED)
@@ -463,11 +463,11 @@ endif()
 if(GMX_GPU)
     # now that we have detected the dependencies, do the second configure pass
     gmx_gpu_setup()
-endif(GMX_GPU)
+endif()
 
 if(CYGWIN)
     set(GMX_CYGWIN 1)
-endif(CYGWIN)
+endif()
 
 if(WIN32 AND NOT CYGWIN)
     set(GMX_NATIVE_WINDOWS 1)
@@ -482,7 +482,7 @@ if(GMX_GIT_VERSION_INFO)
         message(FATAL_ERROR
             "Cannot generate git version information from source tree not under git. "
             "Set GMX_GIT_VERSION_INFO=OFF to proceed.")
-    endif ()
+    endif()
     # We need at least git v1.5.3 be able to parse git's date output. If not
     # found or the version is too small, we can't generate version information.
     find_package(Git)
@@ -614,7 +614,7 @@ include(gmxTestXDR)
 gmx_test_xdr(GMX_SYSTEM_XDR)
 if(NOT GMX_SYSTEM_XDR)
     set(GMX_INTERNAL_XDR 1)
-endif(NOT GMX_SYSTEM_XDR)
+endif()
 
 
 ##################################################
@@ -679,7 +679,7 @@ if(GMX_LOAD_PLUGINS)
   else()
     set(PKG_DL_LIBS)
   endif()
-endif(GMX_LOAD_PLUGINS)
+endif()
 set(VMD_QUIETLY TRUE CACHE INTERNAL "")
 
 # Link real-time library for POSIX timers. The check for clock_gettime
@@ -691,7 +691,7 @@ endif()
 # Math and thread libraries must often come after all others when linking...
 if(HAVE_LIBM)
     list(APPEND GMX_EXTRA_LIBRARIES m)
-endif(HAVE_LIBM)
+endif()
 
 option(GMX_NACL "Configure for Native Client builds" OFF)
 if (GMX_NACL)
@@ -706,7 +706,7 @@ if(GMX_FAHCORE)
   set(COREWRAP_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../corewrap" CACHE STRING
       "Path to swindirect.h")
   include_directories(${COREWRAP_INCLUDE_DIR})
-endif(GMX_FAHCORE)
+endif()
 
 option(GMX_BUILD_HELP "Build man pages, HTML help, and completions automatically (requires that compiled binaries can be executed on the build host)" OFF)
 mark_as_advanced(GMX_BUILD_HELP)
@@ -807,7 +807,7 @@ else()
         install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/external/boost/boost
                 DESTINATION ${INCL_INSTALL_DIR}/gromacs/external/boost
                 COMPONENT development)
-    endif ()
+    endif()
 endif()
 
 if(GMX_USE_TNG)
@@ -837,7 +837,7 @@ if (GMX_BUILD_FOR_COVERAGE)
     # be triggered by using an API against its specification isn't usually
     # worth the effort.
     add_definitions(-DNDEBUG -DBOOST_DISABLE_ASSERTS -DGMX_DISABLE_ASSERTS)
-endif ()
+endif()
 
 if (BUILD_TESTING)
     # "tests" target builds all the separate test binaries.
@@ -858,7 +858,7 @@ if (NOT GMX_BUILD_MDRUN_ONLY)
     add_subdirectory(doxygen)
     add_subdirectory(share)
     add_subdirectory(scripts)
-endif ()
+endif()
 add_subdirectory(src)
 
 if (BUILD_TESTING)