Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Since cmake 2.6, else() and endif() don't need to repeat the condition.
[simgrid.git] / buildtools / Cmake / Modules / FindGTnets.cmake
index 46e24c2..bd12fa6 100644 (file)
@@ -20,38 +20,38 @@ if(HAVE_GTNETS_LIB AND HAVE_SIMULATOR_H)
     OUTPUT_VARIABLE COMPILE_GTNETS_VAR)
   if(COMPILE_GTNETS_VAR)
     SET(HAVE_GTNETS 0)
-  else(COMPILE_GTNETS_VAR)
+  else()
     SET(HAVE_GTNETS 1)
 
     string(REGEX MATCH "-L${GTNETS_LIB_PATH} " operation "${CMAKE_C_FLAGS}")
     if(NOT operation)
       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${GTNETS_LIB_PATH} ")
-    endif(NOT operation)
+    endif()
 
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-I${HAVE_SIMULATOR_H} -L${GTNETS_LIB_PATH} ")
 
     string(REGEX MATCH "${GTNETS_LIB_PATH}" operation "$ENV{LD_LIBRARY_PATH}")
     if(NOT operation)
       message(FATAL_ERROR "\n\nTo use GTNETS don't forget to set LD_LIBRARY_PATH with \n\texport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${GTNETS_LIB_PATH}\n\n")
-    endif(NOT operation)
+    endif()
 
-  endif(COMPILE_GTNETS_VAR)
+  endif()
 
-else(HAVE_GTNETS_LIB AND HAVE_SIMULATOR_H)
+else()
   if(NOT HAVE_GTNETS_LIB)
     message(STATUS "Gtnets is enabled but can't find it.")
-  endif(NOT HAVE_GTNETS_LIB)
+  endif()
   if(NOT HAVE_SIMULATOR_H)
     message(STATUS "Gtnets needs simulator.h")
-  endif(NOT HAVE_SIMULATOR_H)
-endif(HAVE_GTNETS_LIB AND HAVE_SIMULATOR_H)
+  endif()
+endif()
 
 message(STATUS "Looking for lib gtnets patch")
 if(HAVE_GTNETS)
   message(STATUS "Looking for lib gtnets patch - found")
-else(HAVE_GTNETS)
+else()
   message(STATUS "Looking for lib gtnets patch - not found")
-endif(HAVE_GTNETS)
+endif()
 
 mark_as_advanced(HAVE_GTNETS_LIB)
 mark_as_advanced(HAVE_SIMULATOR_H)
\ No newline at end of file