Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new traces files were added in examples/smpi/replay. treat them as the
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index caa2a03..b33553e 100644 (file)
@@ -52,7 +52,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390")
 ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
   message(STATUS "System processor: sh")
 
-ELSE() #PROCESSOR NOT fIND
+ELSE() #PROCESSOR NOT FOUND
   message(STATUS "PROCESSOR NOT FOUND: ${CMAKE_SYSTEM_PROCESSOR}")
 
 ENDIF()
@@ -82,6 +82,12 @@ if(enable_smpi)
   include(FindF2c)
   SET(HAVE_SMPI 1)
 endif()
+if(enable_java)
+  find_package(Java REQUIRED COMPONENTS Runtime Development)
+  find_package(JNI REQUIRED)
+  include(UseJava)
+  set(HAVE_Java 1)
+endif()
 if(enable_lua)
   include(FindLua51Simgrid)
 endif()
@@ -118,7 +124,6 @@ CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H)
 CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
 CHECK_INCLUDE_FILE("sys/sysctl.h" HAVE_SYS_SYSCTL_H)
 CHECK_INCLUDE_FILE("time.h" HAVE_TIME_H)
-CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
 CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
 CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
 CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H)
@@ -157,10 +162,10 @@ else()
 endif()
 
 # Our usage of mmap is Linux-specific (flag MAP_ANONYMOUS), but kFreeBSD uses a GNU libc
-IF(NOT "${CMAKE_SYSTEM}" MATCHES "Linux" AND NOT "${CMAKE_SYSTEM}" MATCHES "kFreeBSD" AND NOT "${CMAKE_SYSTEM}" MATCHES "GNU")
+IF(NOT "${CMAKE_SYSTEM}" MATCHES "Linux" AND NOT "${CMAKE_SYSTEM}" MATCHES "kFreeBSD" AND NOT "${CMAKE_SYSTEM}" MATCHES "GNU" AND NOT  "${CMAKE_SYSTEM}" MATCHES "Darwin")
   SET(HAVE_MMAP 0)
   message(STATUS "Warning: MMAP is thought as non functional on this architecture (${CMAKE_SYSTEM})")
-ENDIF()
+ENDIF(NOT "${CMAKE_SYSTEM}" MATCHES "Linux" AND NOT "${CMAKE_SYSTEM}" MATCHES "kFreeBSD" AND NOT "${CMAKE_SYSTEM}" MATCHES "GNU" AND NOT  "${CMAKE_SYSTEM}" MATCHES "Darwin")
 
 if(WIN32) #THOSE FILES ARE FUNCTIONS ARE NOT DETECTED BUT THEY SHOULD...
   set(HAVE_UCONTEXT_H 1)
@@ -215,6 +220,40 @@ endif()
 CHECK_TYPE_SIZE(int SIZEOF_INT)
 CHECK_TYPE_SIZE(void* SIZEOF_VOIDP)
 
+#--------------------------------------------------------------------------------------------------
+### Check for GNU dynamic linker
+CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
+if (HAVE_DLFCN_H)
+    execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c -ldl -o test_gnu_ld
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+      OUTPUT_VARIABLE HAVE_GNU_LD_compil
+    )
+    if(HAVE_GNU_LD_compil)
+      set(HAVE_GNU_LD 0)
+      message(STATUS "Warning: test program toward GNU ld failed to compile:")
+      message(STATUS "${HAVE_GNU_LD_comp_output}")
+    else()
+
+      execute_process(COMMAND ./test_gnu_ld
+          WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 
+          RESULT_VARIABLE HAVE_GNU_LD_run 
+          OUTPUT_VARIABLE var_exec
+      )
+
+      if(NOT HAVE_GNU_LD_run)
+        set(HAVE_GNU_LD 1)
+        message(STATUS "We are using GNU dynamic linker")
+      else()
+        set(HAVE_GNU_LD 0)
+        message(STATUS "Warning: error while checking for GNU ld:")
+        message(STATUS "Test output: '${var_exec}'")
+       message(STATUS "Exit status: ${HAVE_GNU_LD_run}")
+      endif()
+      file(REMOVE test_gnu_ld)
+    endif()
+endif()
+
+
 #--------------------------------------------------------------------------------------------------
 ### Initialize of CONTEXT THREADS
 
@@ -228,12 +267,10 @@ if(pthread)
   ### Test that we have a way to create semaphores
 
   if(HAVE_SEM_OPEN_LIB)
-
-    exec_program(
-      "${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_open.c -lpthread -o testprog"
-      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-      OUTPUT_VARIABLE HAVE_SEM_OPEN_compil
-      )
+    execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_open.c -lpthread -o sem_open
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    OUTPUT_VARIABLE HAVE_SEM_OPEN_compil
+    )
 
     if(HAVE_SEM_OPEN_compil)
       set(HAVE_SEM_OPEN 0)
@@ -244,15 +281,26 @@ if(pthread)
       message(STATUS "sem_open is compilable")
     endif()
 
-    exec_program("${CMAKE_BINARY_DIR}/testprog" RETURN_VALUE HAVE_SEM_OPEN_run OUTPUT_VARIABLE var_compil)
-    file(REMOVE "${CMAKE_BINARY_DIR}/testprog*")
+    execute_process(COMMAND ./sem_open
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 
+    RESULT_VARIABLE HAVE_SEM_OPEN_run 
+    OUTPUT_VARIABLE var_compil
+    )
+    file(REMOVE sem_open)
 
     if(NOT HAVE_SEM_OPEN_run)
       set(HAVE_SEM_OPEN 1)
       message(STATUS "sem_open is executable")
     else()
       set(HAVE_SEM_OPEN 0)
+      if(EXISTS "${CMAKE_BINARY_DIR}/sem_open")
+        message(STATUS "Bin ${CMAKE_BINARY_DIR}/sem_open exists!")
+      else()
+        message(STATUS "Bin ${CMAKE_BINARY_DIR}/sem_open not exists!")
+      endif()
       message(STATUS "Warning: sem_open not executable")
+      message(STATUS "Compilation output: '${var_compil}'")
+      message(STATUS "Exit result of sem_open: ${HAVE_SEM_OPEN_run}")
     endif()
 
   else()
@@ -260,12 +308,10 @@ if(pthread)
   endif()
 
   if(HAVE_SEM_INIT_LIB)
-    exec_program(
-      "${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_init.c -lpthread -o testprog"
-      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-      OUTPUT_VARIABLE HAVE_SEM_INIT_compil
-      )
-
+    execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_init.c -lpthread -o sem_init
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 
+    RESULT_VARIABLE HAVE_SEM_INIT_run OUTPUT_VARIABLE HAVE_SEM_INIT_compil)
+    
     if(HAVE_SEM_INIT_compil)
       set(HAVE_SEM_INIT 0)
       message(STATUS "Warning: sem_init not compilable")
@@ -274,16 +320,27 @@ if(pthread)
       set(HAVE_SEM_INIT 1)
       message(STATUS "sem_init is compilable")
     endif()
+    execute_process(COMMAND ./sem_init 
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 
+    RESULT_VARIABLE HAVE_SEM_INIT_run 
+    OUTPUT_VARIABLE var_compil
+    )
+    file(REMOVE sem_init)
 
-    exec_program("${CMAKE_BINARY_DIR}/testprog" RETURN_VALUE HAVE_SEM_INIT_run OUTPUT_VARIABLE var_compil)
-    file(REMOVE "${CMAKE_BINARY_DIR}/testprog*")
 
     if(NOT HAVE_SEM_INIT_run)
       set(HAVE_SEM_INIT 1)
       message(STATUS "sem_init is executable")
     else()
       set(HAVE_SEM_INIT 0)
+      if(EXISTS "${CMAKE_BINARY_DIR}/sem_init")
+        message(STATUS "Bin ${CMAKE_BINARY_DIR}/sem_init exists!")
+      else()
+        message(STATUS "Bin ${CMAKE_BINARY_DIR}/sem_init not exists!")
+      endif()
       message(STATUS "Warning: sem_init not executable")
+      message(STATUS "Compilation output: '${var_compil}'")
+      message(STATUS "Exit result of sem_init: ${HAVE_SEM_INIT_run}")
     endif()
   endif()
 
@@ -352,14 +409,15 @@ IF(CMAKE_CROSSCOMPILING)
 ELSE()
   file(REMOVE "${CMAKE_BINARY_DIR}/testprog*")
   file(REMOVE ${CMAKE_BINARY_DIR}/conftestval)
-  exec_program(
-    "${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c ${mcsc_flags} -o testprog"
-    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/
-    OUTPUT_VARIABLE COMPILE_mcsc_VAR)
+  execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c ${mcsc_flags} -o testprog
+  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/
+  OUTPUT_VARIABLE COMPILE_mcsc_VAR)
 
   if(NOT COMPILE_mcsc_VAR)
     message(STATUS "prog_AC_CHECK_MCSC.c is compilable")
-    exec_program("${CMAKE_BINARY_DIR}/testprog" OUTPUT_VARIABLE var_compil)
+    execute_process(COMMAND ./testprog
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/
+    OUTPUT_VARIABLE var_compil)
   else()
     message(STATUS "prog_AC_CHECK_MCSC.c is not compilable")
   endif()
@@ -416,158 +474,43 @@ endif()
 ## GIT version check
 ##
 if(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/ AND NOT WIN32)
-  exec_program("git remote | head -n 1" OUTPUT_VARIABLE remote RETURN_VALUE ret)
-  exec_program("git config --get remote.${remote}.url" OUTPUT_VARIABLE url RETURN_VALUE ret)
-
+  execute_process(COMMAND git remote
+  COMMAND head -n 1
+  WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/.git/
+  OUTPUT_VARIABLE remote
+  RESULT_VARIABLE ret
+  )
+  string(REPLACE "\n" "" remote "${remote}")
+  #message(STATUS "Git remote: ${remote}")
+  execute_process(COMMAND git config --get remote.${remote}.url
+  WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/.git/
+  OUTPUT_VARIABLE url
+  RESULT_VARIABLE ret
+  )
+  string(REPLACE "\n" "" url "${url}")
+  #message(STATUS "Git url: ${url}")
   if(url)
-    exec_program("git --git-dir=${CMAKE_HOME_DIRECTORY}/.git log --oneline -1" OUTPUT_VARIABLE "GIT_VERSION")
+    execute_process(COMMAND git --git-dir=${CMAKE_HOME_DIRECTORY}/.git log --pretty=oneline --abbrev-commit -1
+    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/.git/
+    OUTPUT_VARIABLE GIT_VERSION
+    RESULT_VARIABLE ret
+    )
+    string(REPLACE "\n" "" GIT_VERSION "${GIT_VERSION}")
     message(STATUS "Git version: ${GIT_VERSION}")
-    exec_program("git --git-dir=${CMAKE_HOME_DIRECTORY}/.git log -n 1 --format=%ai ." OUTPUT_VARIABLE "GIT_DATE")
+    execute_process(COMMAND git --git-dir=${CMAKE_HOME_DIRECTORY}/.git log -n 1 --pretty=format:%ai .
+    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/.git/
+    OUTPUT_VARIABLE GIT_DATE
+    RESULT_VARIABLE ret
+    )
+    string(REPLACE "\n" "" GIT_DATE "${GIT_DATE}")
     message(STATUS "Git date: ${GIT_DATE}")
     string(REGEX REPLACE " .*" "" GIT_VERSION "${GIT_VERSION}")
-    STRING(REPLACE " +0000" "" GIT_DATE ${GIT_DATE})
-    STRING(REPLACE " " "~" GIT_DATE ${GIT_DATE})
-    STRING(REPLACE ":" "-" GIT_DATE ${GIT_DATE})
+    STRING(REPLACE " +0000" "" GIT_DATE "${GIT_DATE}")
+    STRING(REPLACE " " "~" GIT_DATE "${GIT_DATE}")
+    STRING(REPLACE ":" "-" GIT_DATE "${GIT_DATE}")
   endif()
 endif()
 
-###################################
-## SimGrid and GRAS specific checks
-##
-
-IF(NOT CMAKE_CROSSCOMPILING)
-  # Check architecture signature begin
-  try_run(RUN_GRAS_VAR COMPILE_GRAS_VAR
-    ${CMAKE_BINARY_DIR}
-    ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_GRAS_ARCH.c
-    RUN_OUTPUT_VARIABLE var1
-    )
-  if(BIGENDIAN)
-    set(val_big "B${var1}")
-    set(GRAS_BIGENDIAN 1)
-  else()
-    set(val_big "l${var1}")
-    set(GRAS_BIGENDIAN 0)
-  endif()
-
-  # The syntax of this magic string is given in src/xbt/datadesc/ddt_convert.c
-  # It kinda matches the values that the xbt_arch_desc_t structure can take
-
-  # Basically, the syntax is one char l or B for endianness (little or Big)
-  #   then there is a bunch of blocks separated by _.
-  # C block is for char, I block for integers, P block for pointers and
-  #   D block for floating points
-  # For each block there is an amount of chuncks separated by :, each of
-  #   them describing a data size. For example there is only one chunk
-  #   in the char block, because no architecture provide several sizes
-  #   of chars. In integer block, there is 4 chunks: "short int", "int",
-  #   "long int", "long long int". There is 2 pointer chunks for data
-  #   pointers and pointers on functions (thanks to the AMD64 madness).
-  #   Thee two floating points chuncks are for "float" and "double".
-  # Each chunk is of the form datasize/minimal_alignment_size
-
-  # These informations are used to convert a data stream from one
-  #    formalism to another. Only the GRAS_ARCH is transfered in the
-  #    stream, and it it of cruxial importance to keep these detection
-  #    information here synchronized with the data hardcoded in the
-  #    source in src/xbt/datadesc/ddt_convert.c
-
-  # If you add something here (like a previously unknown architecture),
-  #    please add it to the source code too.
-  # Please do not modify stuff here since it'd break the GRAS protocol.
-  #     If you really need to change stuff, please also bump
-  #    GRAS_PROTOCOL_VERSION in src/gras/Msg/msg_interface.h
-
-  SET(GRAS_THISARCH "none")
-
-  if(val_big MATCHES "l_C:1/1:_I:2/1:4/1:4/1:8/1:_P:4/1:4/1:_D:4/1:8/1:")
-    #gras_arch=0; gras_size=32; gras_arch_name=little32_1;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 0)
-  endif()
-  if(val_big MATCHES "l_C:1/1:_I:2/2:4/2:4/2:8/2:_P:4/2:4/2:_D:4/2:8/2:")
-    #gras_arch=1; gras_size=32; gras_arch_name=little32_2;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 1)
-  endif()
-  if(val_big MATCHES "l_C:1/1:_I:2/2:4/4:4/4:8/4:_P:4/4:4/4:_D:4/4:8/4:")
-    #gras_arch=2; gras_size=32; gras_arch_name=little32_4;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 2)
-  endif()
-  if(val_big MATCHES "l_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/8:")
-    #gras_arch=3; gras_size=32; gras_arch_name=little32_8;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 3)
-  endif()
-  if(val_big MATCHES "l_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8:")
-    #gras_arch=4; gras_size=64; gras_arch_name=little64;
-    SET(GRAS_ARCH_32_BITS 0)
-    SET(GRAS_THISARCH 4)
-  endif()
-  if(val_big MATCHES "l_C:1/1:_I:2/2:4/4:4/4:8/8:_P:8/8:8/8:_D:4/4:8/8:")
-    #gras_arch=5; gras_size=64; gras_arch_name=little64_2;
-    SET(GRAS_ARCH_32_BITS 0)
-    SET(GRAS_THISARCH 5)
-  endif()
-
-  if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/8:")
-    #gras_arch=6; gras_size=32; gras_arch_name=big32_8;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 6)
-  endif()
-  if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/4:")
-    #gras_arch=7; gras_size=32; gras_arch_name=big32_8_4;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 7)
-  endif()
-  if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/4:_P:4/4:4/4:_D:4/4:8/4:")
-    #gras_arch=8; gras_size=32; gras_arch_name=big32_4;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 8)
-  endif()
-  if(val_big MATCHES "B_C:1/1:_I:2/2:4/2:4/2:8/2:_P:4/2:4/2:_D:4/2:8/2:")
-    #gras_arch=9; gras_size=32; gras_arch_name=big32_2;
-    SET(GRAS_ARCH_32_BITS 1)
-    SET(GRAS_THISARCH 9)
-  endif()
-  if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8:")
-    #gras_arch=10; gras_size=64; gras_arch_name=big64;
-    SET(GRAS_ARCH_32_BITS 0)
-    SET(GRAS_THISARCH 10)
-  endif()
-  if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/4:")
-    #gras_arch=11; gras_size=64; gras_arch_name=big64_8_4;
-    SET(GRAS_ARCH_32_BITS 0)
-    SET(GRAS_THISARCH 11)
-  endif()
-
-  if(GRAS_THISARCH MATCHES "none")
-    message(STATUS "architecture: ${val_big}")
-    message(FATAL_ERROR "GRAS_THISARCH is empty: '${GRAS_THISARCH}'")
-  endif()
-
-  # Check architecture signature end
-  try_run(RUN_GRAS_VAR COMPILE_GRAS_VAR
-    ${CMAKE_BINARY_DIR}
-    ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_GRAS_CHECK_STRUCT_COMPACTION.c
-    RUN_OUTPUT_VARIABLE var2
-    )
-  separate_arguments(var2)
-  foreach(var_tmp ${var2})
-    set(${var_tmp} 1)
-  endforeach(var_tmp ${var2})
-
-  # Check for [SIZEOF_MAX]
-  try_run(RUN_SM_VAR COMPILE_SM_VAR
-    ${CMAKE_BINARY_DIR}
-    ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_max_size.c
-    RUN_OUTPUT_VARIABLE var3
-    )
-  message(STATUS "SIZEOF_MAX ${var3}")
-  SET(SIZEOF_MAX ${var3})
-ENDIF()
-
 #--------------------------------------------------------------------------------------------------
 
 set(makecontext_CPPFLAGS_2 "")
@@ -637,7 +580,7 @@ endif()
 
 #AC_PROG_MAKE_SET
 
-#AC_PRINTF_NULL
+#AC_PRINTF_NULL FIXME: this is too ancient to survive!
 try_run(RUN_PRINTF_NULL_VAR COMPILE_PRINTF_NULL_VAR
   ${CMAKE_BINARY_DIR}
   ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_printf_null.c
@@ -748,20 +691,6 @@ foreach(fct ${diff_va})
 endforeach(fct ${diff_va})
 
 #--------------------------------------------------------------------------------------------------
-### check for getline
-try_compile(COMPILE_RESULT_VAR
-  ${CMAKE_BINARY_DIR}
-  ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_getline.c
-  )
-
-if(NOT COMPILE_RESULT_VAR)
-  SET(need_getline "#define SIMGRID_NEED_GETLINE 1")
-  SET(SIMGRID_NEED_GETLINE 1)
-else()
-  SET(need_getline "")
-  SET(SIMGRID_NEED_GETLINE 0)
-endif()
-
 ### check for a working snprintf
 if(HAVE_SNPRINTF AND HAVE_VSNPRINTF OR WIN32)
   if(WIN32)
@@ -835,8 +764,8 @@ endif()
 configure_file("${CMAKE_HOME_DIRECTORY}/src/context_sysv_config.h.in"                  "${CMAKE_BINARY_DIR}/src/context_sysv_config.h" @ONLY IMMEDIATE)
 
 SET( CMAKEDEFINE "#cmakedefine" )
-configure_file("${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/src/gras_config.h.in"         "${CMAKE_BINARY_DIR}/src/gras_config.h" @ONLY IMMEDIATE)
-configure_file("${CMAKE_BINARY_DIR}/src/gras_config.h"                         "${CMAKE_BINARY_DIR}/src/gras_config.h" @ONLY IMMEDIATE)
+configure_file("${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/src/internal_config.h.in"     "${CMAKE_BINARY_DIR}/src/internal_config.h" @ONLY IMMEDIATE)
+configure_file("${CMAKE_BINARY_DIR}/src/internal_config.h"                     "${CMAKE_BINARY_DIR}/src/internal_config.h" @ONLY IMMEDIATE)
 configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid_config.h.in"           "${CMAKE_BINARY_DIR}/include/simgrid_config.h" @ONLY IMMEDIATE)
 
 set(top_srcdir "${CMAKE_HOME_DIRECTORY}")
@@ -853,6 +782,7 @@ configure_file(${CMAKE_HOME_DIRECTORY}/include/smpi/smpif.h.in ${CMAKE_BINARY_DI
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_BINARY_DIR}/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/bin/smpiff @ONLY)
+configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/bin/smpirun @ONLY)
 
 ### Script used when simgrid is compiling
@@ -866,19 +796,22 @@ set(libdir "${CMAKE_BINARY_DIR}/lib")
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff @ONLY)
+configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun @ONLY)
 
 set(top_builddir ${CMAKE_HOME_DIRECTORY})
 
 if(NOT WIN32)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc" OUTPUT_VARIABLE OKITOKI)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif2c" OUTPUT_VARIABLE OKITOKI)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff" OUTPUT_VARIABLE OKITOKI)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun" OUTPUT_VARIABLE OKITOKI)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc" OUTPUT_VARIABLE OKITOKI)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif2c" OUTPUT_VARIABLE OKITOKI)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff" OUTPUT_VARIABLE OKITOKI)
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun" OUTPUT_VARIABLE OKITOKI)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif2c)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif90)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif2c)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun)
 endif()
 
 set(generated_headers_to_install
@@ -888,7 +821,7 @@ set(generated_headers_to_install
 
 set(generated_headers
   ${CMAKE_CURRENT_BINARY_DIR}/src/context_sysv_config.h
-  ${CMAKE_CURRENT_BINARY_DIR}/src/gras_config.h
+  ${CMAKE_CURRENT_BINARY_DIR}/src/internal_config.h
   )
 
 set(generated_files_to_clean
@@ -897,12 +830,12 @@ set(generated_files_to_clean
   ${CMAKE_BINARY_DIR}/bin/smpicc
   ${CMAKE_BINARY_DIR}/bin/smpif2c
   ${CMAKE_BINARY_DIR}/bin/smpiff
+  ${CMAKE_BINARY_DIR}/bin/smpif90
   ${CMAKE_BINARY_DIR}/bin/smpirun
   ${CMAKE_BINARY_DIR}/bin/colorize
   ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml
   ${CMAKE_BINARY_DIR}/examples/smpi/tracing/smpi_traced.trace
   ${CMAKE_BINARY_DIR}/src/supernovae_sg.c
-  ${CMAKE_BINARY_DIR}/src/supernovae_gras.c
   ${CMAKE_BINARY_DIR}/src/supernovae_smpi.c
   )
 
@@ -914,7 +847,13 @@ else()
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/msg/tracing/platform.xml ${CMAKE_BINARY_DIR}/examples/msg/tracing/platform.xml COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions0.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions0.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions1.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions1.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_allReduce.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allReduce.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_barrier.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_barrier.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_bcast.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_bcast.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_with_isend.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_with_isend.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_alltoall.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_alltoall.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_alltoallv.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_alltoallv.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_waitall.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_waitall.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/hostfile ${CMAKE_BINARY_DIR}/teshsuite/smpi/hostfile COPYONLY)
 
   set(generated_files_to_clean
@@ -925,7 +864,13 @@ else()
     ${CMAKE_BINARY_DIR}/examples/msg/tracing/platform.xml
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions0.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions1.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allReduce.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_barrier.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_bcast.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_with_isend.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_alltoall.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_alltoallv.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_waitall.txt
     ${CMAKE_BINARY_DIR}/teshsuite/smpi/hostfile
     )
 endif()