Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[CMAKE] Indentation in CMakeLists.txt
[simgrid.git] / CMakeLists.txt
index c1093c6..aa8cfed 100644 (file)
@@ -60,8 +60,12 @@ if(APPLE AND (CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6"))
   set(HAVE_UCONTEXT_H 0)
 endif()
 
+
+### Setup Options
+include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Option.cmake)
+
 ### SMPI vs. Fortran
-if (NOT DEFINED enable_smpi OR enable_smpi) 
+if ((NOT DEFINED enable_smpi) OR enable_smpi) 
   if(enable_fortran)
     include(FindGFortran)
   else()
@@ -69,26 +73,26 @@ if (NOT DEFINED enable_smpi OR enable_smpi)
   endif()
   
   if(NOT APPLE) # smpi is enabled by default
-  # Call enable_language(Fortran) in order to load the build rules for this language, needed by 
-  # teshsuite/smpi/mpich-test/.  Use CMAKE_FORCE_Fortran_COMPILER to bypass checks for a working compiler (smpiff 
-  # doesn't exist at configure time).
-  include(CMakeForceCompiler)
-  if(NOT COMMAND CMAKE_FORCE_Fortran_COMPILER)
-    MACRO(CMAKE_FORCE_Fortran_COMPILER compiler id)
-      SET(CMAKE_Fortran_COMPILER "${compiler}")
-      SET(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
-      SET(CMAKE_Fortran_COMPILER_ID ${id})
-      SET(CMAKE_Fortran_COMPILER_WORKS TRUE)
-      SET(CMAKE_Fortran_COMPILER_FORCED TRUE)
-
-      # Set old compiler id variables.
-      IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
-        SET(CMAKE_COMPILER_IS_GNUG77 1)
-      ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
-    ENDMACRO(CMAKE_FORCE_Fortran_COMPILER)
-  endif()
-  CMAKE_FORCE_Fortran_COMPILER(smpiff smpiff)
-  enable_language(Fortran OPTIONAL)
+    # Call enable_language(Fortran) in order to load the build rules for this language, needed by 
+    # teshsuite/smpi/mpich-test/.  Use CMAKE_FORCE_Fortran_COMPILER to bypass checks for a working compiler (smpiff 
+    # doesn't exist at configure time).
+    include(CMakeForceCompiler)
+    if(NOT COMMAND CMAKE_FORCE_Fortran_COMPILER)
+      MACRO(CMAKE_FORCE_Fortran_COMPILER compiler id)
+        SET(CMAKE_Fortran_COMPILER "${compiler}")
+        SET(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
+        SET(CMAKE_Fortran_COMPILER_ID ${id})
+        SET(CMAKE_Fortran_COMPILER_WORKS TRUE)
+        SET(CMAKE_Fortran_COMPILER_FORCED TRUE)
+
+        # Set old compiler id variables.
+        IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+          SET(CMAKE_COMPILER_IS_GNUG77 1)
+        ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+      ENDMACRO(CMAKE_FORCE_Fortran_COMPILER)
+    endif()
+    CMAKE_FORCE_Fortran_COMPILER(smpiff smpiff)
+    enable_language(Fortran OPTIONAL)
   endif()
 endif()
 
@@ -173,8 +177,7 @@ endif()
 
 include_directories(${INCLUDES})
 
-### Setup Options
-include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Option.cmake)
+
 
 ### Determine the assembly flavor that we need today
 set(HAVE_RAW_CONTEXTS 0)