Cleaned up endif/else-s in CMakeLists.txt and *.cmake files
[alexxy/gromacs.git] / cmake / gmxTestRestrict.cmake
index f496ec97c78cdde4f0eace1de630461c8eb26f29..391e8e4882da10b1a5e42390eb74d229dfb04e85 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2012, by the GROMACS development team, led by
+# Copyright (c) 2010,2012,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.
@@ -48,24 +48,20 @@ MACRO(GMX_TEST_RESTRICT VARIABLE)
 # Start with __restrict__, since that is the C++ default keyword.
        FOREACH(KEYWORD "__restrict__" "__restrict" "restrict")
             IF(NOT TEST_${VARIABLE})
-                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"    
+                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"
                             "${CMAKE_SOURCE_DIR}/cmake/TestRestrict.c"
                             COMPILE_DEFINITIONS "-DTESTRESTRICTDEF=${KEYWORD}" )
                 SET(LAST_RESTRICT_KEYWORD ${KEYWORD})
-            ENDIF(NOT TEST_${VARIABLE})
+            ENDIF()
         ENDFOREACH(KEYWORD)
 
         IF(TEST_${VARIABLE})
             SET(${VARIABLE} ${LAST_RESTRICT_KEYWORD} CACHE INTERNAL "Restrict keyword" FORCE)
             MESSAGE(STATUS "Checking for restrict keyword - ${LAST_RESTRICT_KEYWORD}")
-        ELSE(TEST_${VARIABLE})
+        ELSE()
            SET(${VARIABLE} " " CACHE INTERNAL "Restrict keyword" FORCE)
             MESSAGE(STATUS "Checking for restrict keyword - not found")
-        ENDIF(TEST_${VARIABLE})
+        ENDIF()
 
-    ENDIF(NOT DEFINED TEST_${VARIABLE})        
+    ENDIF()
 ENDMACRO(GMX_TEST_RESTRICT VARIABLE)
-
-
-
-