Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 3 Dec 2010 10:19:19 +0000 (10:19 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 3 Dec 2010 10:19:19 +0000 (10:19 +0000)
Remove old messages to be compatible with cmake messages.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8972 48e7efb5-ca39-0410-a469-dd3cf9ba447f

14 files changed:
CMakeLists.txt
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/GenerateDoc.cmake
buildtools/Cmake/MaintainerMode.cmake
buildtools/Cmake/Modules/FindF2c.cmake
buildtools/Cmake/Modules/FindGraphviz.cmake
buildtools/Cmake/Modules/FindLua51Simgrid.cmake
buildtools/Cmake/Modules/FindPCRE.cmake [new file with mode: 0644]
buildtools/Cmake/Modules/FindRubySimgrid.cmake [new file with mode: 0644]
buildtools/Cmake/Modules/FindSimGrid.cmake
buildtools/Cmake/Modules/FindValgrind.cmake [new file with mode: 0644]
buildtools/Cmake/Pipol.cmake
buildtools/Cmake/PrintArgs.cmake

index bb26cff..ecf2da0 100644 (file)
@@ -147,9 +147,6 @@ else(WIN32)
     include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/MakeExeLib.cmake)
 endif(WIN32)
 
-### Build the doc
-include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateDoc.cmake)
-
 ### Make Simgrid.jar and Java examples
 if(HAVE_JAVA)
        include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/MakeJava.cmake)
@@ -170,6 +167,9 @@ include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Distrib.cmake)
 ### Pipol compilation
 include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Pipol.cmake)
 
+### Build the doc
+include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateDoc.cmake)
+
 ### Print ARGS
 include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/PrintArgs.cmake)
 
index a0d6543..4f8d0e9 100644 (file)
@@ -1,3 +1,7 @@
+if(enable_memcheck)
+include(FindValgrind)
+endif(enable_memcheck)
+
 if(enable_smpi)
        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")
@@ -5,22 +9,6 @@ if(enable_smpi)
        exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun" OUTPUT_VARIABLE "OKITOKI")
 endif(enable_smpi)
 
-if(enable_memcheck)
-       exec_program("valgrind --version " OUTPUT_VARIABLE "VALGRIND_VERSION")
-       if(VALGRIND_VERSION)
-               string(REGEX MATCH "[0-9].[0-9].[0-9]" NEW_VALGRIND_VERSION "${VALGRIND_VERSION}")
-               if(NEW_VALGRIND_VERSION)
-                       exec_program("${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/generate_memcheck_tests.pl ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/AddTests.cmake > ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/memcheck_tests.cmake")
-               else(NEW_VALGRIND_VERSION)
-                       set(enable_memcheck false)
-                       message("Command valgrind not found --> enable_memcheck autoset to false.")
-               endif(NEW_VALGRIND_VERSION)
-       else(VALGRIND_VERSION)
-               set(enable_memcheck false)
-               message(FATAL_ERROR "Command valgrind not found --> enable_memcheck autoset to false.")
-       endif(VALGRIND_VERSION)
-endif(enable_memcheck)
-
 ### For code coverage
 ### Set some variables
 SET(UPDATE_TYPE "svn")
@@ -29,9 +17,6 @@ SET(DROP_SITE "cdash.inria.fr/CDash")
 SET(DROP_LOCATION "/submit.php?project=${PROJECT_NAME}")
 SET(DROP_SITE_CDASH TRUE)
 SET(TRIGGER_SITE "http://cdash.inria.fr/CDash/cgi-bin/Submit-Random-TestingResults.cgi")
-set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-reachable=yes --track-origins=yes --read-var-info=no")
-SET(VALGRIND_COMMAND "${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/my_valgrind.pl")
-SET(MEMORYCHECK_COMMAND "${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/my_valgrind.pl")
 #If you use the --read-var-info option Memcheck will run more slowly but may give a more detailed description of any illegal address.
 
 INCLUDE(CTest)
index 1ff7dd7..62c1be7 100644 (file)
@@ -2,14 +2,28 @@ set(CMAKE_MODULE_PATH
 ${CMAKE_MODULE_PATH}
 ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules
 )
+
+message("-- Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
+
 include(CheckFunctionExists)
 include(CheckIncludeFile)
 include(CheckIncludeFiles)
 include(CheckLibraryExists)
 include(TestBigEndian)
-include(FindGraphviz)
 TEST_BIG_ENDIAN(BIGENDIAN)
 
+include(FindGraphviz)
+include(FindPCRE)
+if(enable_ruby)
+       include(FindRubySimgrid)        
+endif(enable_ruby)
+if(enable_smpi)
+       include(FindF2c)
+endif(enable_smpi)
+if(enable_lua)
+       include(FindLua51Simgrid)
+endif(enable_lua)
+
 # Checks for header libraries functions.
 CHECK_LIBRARY_EXISTS(pthread   pthread_create          NO_DEFAULT_PATHS pthread)
 CHECK_LIBRARY_EXISTS(pthread   sem_init                NO_DEFAULT_PATHS HAVE_SEM_INIT_LIB)
@@ -78,7 +92,7 @@ if(enable_latency_bound_tracking)
        SET(HAVE_LATENCY_BOUND_TRACKING 1)
 else(enable_latency_bound_tracking)
   if(enable_gtnets)
-    message("turning latency_bound_tracking to ON because GTNeTs is ON")
+    message("-- Warning : Turning latency_bound_tracking to ON because GTNeTs is ON")
     SET(enable_latency_bound_tracking ON)
     SET(HAVE_LATENCY_BOUND_TRACKING 1)
   else(enable_gtnets)
@@ -95,60 +109,26 @@ else(enable_model-checking AND HAVE_MMAP)
 endif(enable_model-checking AND HAVE_MMAP)
 
 if(enable_lua)
-       include(FindLua51Simgrid)
        if(LUA51_FOUND)
                set(HAVE_LUA 1)
                SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${LUA_INCLUDE_DIR} ")
                SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${LUA_LIBRARY_DIR} ")
        else(LUA51_FOUND)
-               message("Lua binding need version 5.1 and cmake version 2.8")
-               message("Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
+               message("-- Warning : Lua need version 5.1")
        endif(LUA51_FOUND)
 endif(enable_lua)
 
-if(enable_ruby)
-       include(FindRuby)
-       if(RUBY_LIBRARY)
-               if(RUBY_VERSION_MAJOR MATCHES "1" AND RUBY_VERSION_MINOR MATCHES "9")
-                       set(LIB_RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
-                       string(REGEX MATCH "ruby.*[0-9]" RUBY_LIBRARY_NAME ${RUBY_LIBRARY})
-                       if(NOT RUBY_LIBRARY_NAME)
-                               set(RUBY_LIBRARY_NAME ruby)
-                       endif(NOT RUBY_LIBRARY_NAME)
-                       string(REGEX REPLACE "/libruby.*$" "" RUBY_LIBRARY ${RUBY_LIBRARY})
-                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${RUBY_CONFIG_INCLUDE_DIR} ") #path to config.h
-                       string(COMPARE EQUAL "${RUBY_INCLUDE_DIR}" "${RUBY_CONFIG_INCLUDE_DIR}" operation)
-                       if(NOT operation)
-                               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${RUBY_INCLUDE_DIR} ") #path to ruby.h
-                       endif(NOT operation)
-                       ADD_DEFINITIONS("-I${CMAKE_HOME_DIRECTORY}/src/bindings/ruby -I${CMAKE_HOME_DIRECTORY}/src/simix")
-                       SET(HAVE_RUBY 1)
-               else(RUBY_VERSION_MAJOR MATCHES "1" AND RUBY_VERSION_MINOR MATCHES "9")
-                       message("Ruby binding need version 1.9.x actually version ${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.x")
-                       SET(HAVE_RUBY 0)
-               endif(RUBY_VERSION_MAJOR MATCHES "1" AND RUBY_VERSION_MINOR MATCHES "9")
-       else(RUBY_LIBRARY)
-               SET(HAVE_RUBY 0)
-       endif(RUBY_LIBRARY)
-       
-       if(NOT RUBY_EXECUTABLE)
-               message("Take care : you don't have ruby executable so you can compile and build examples but can't execute them!!!") 
-       endif(NOT RUBY_EXECUTABLE)
-       
-endif(enable_ruby)
-
 #--------------------------------------------------------------------------------------------------
 ### Initialize of Smpi
 
 if(enable_smpi)
-       include(FindF2c)
        if(HAVE_F2C_H)
        string(REGEX MATCH "-I${HAVE_F2C_H} " operation "${CMAKE_C_FLAGS}")
           if(NOT operation)
                        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${HAVE_F2C_H} ")
           endif(NOT operation)
        else(HAVE_F2C_H)
-               message("-- You should install f2c before use smpi.")
+               message("-- Warning : You should install f2c before use smpi.")
        endif(HAVE_F2C_H)       
 endif(enable_smpi)
 
@@ -173,28 +153,6 @@ else(NOT enable_gtnets OR enable_supernovae)
        endif(COMPILE_GTNETS_VAR)
 endif(NOT enable_gtnets OR enable_supernovae)
 
-#--------------------------------------------------------------------------------------------------
-#--------------------------------------------------------------------------------------------------
-### Initialize of pcre
-find_library(PATH_PCRE_LIB pcre)
-find_file(PATH_PCRE_H "pcre.h")
-set(HAVE_PCRE_LIB 0)
-if(PATH_PCRE_LIB AND PATH_PCRE_H)
-       string(REGEX REPLACE "/libpcre.*[.]${LIB_EXE}$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
-       string(REGEX REPLACE "/pcre.h" "" PATH_PCRE_H "${PATH_PCRE_H}")
-       string(REGEX MATCH "-L${PATHLIBPCRE} " operation "${CMAKE_C_FLAGS}")
-          if(NOT operation)
-                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${PATHLIBPCRE} ")
-          endif(NOT operation)
-          string(REGEX MATCH "-I${PATH_PCRE_H} " operation "${CMAKE_C_FLAGS}")
-          if(NOT operation)
-                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${PATH_PCRE_H} ")
-          endif(NOT operation)    
-       set(HAVE_PCRE_LIB 1)
-else(PATH_PCRE_LIB)
-               message("-- You should install libpcre (please install the libpcre3-dev package or equivalent)")
-endif(PATH_PCRE_LIB AND PATH_PCRE_H)
-
 #--------------------------------------------------------------------------------------------------
 ### Initialize of CONTEXT THREADS
 
@@ -309,7 +267,7 @@ endif(with_context MATCHES "pthreads")
 if(with_context MATCHES "auto")
        set(with_context_ok 1)
        set(with_context "ucontext")
-       message("with_context auto change to ucontext")
+       message("-- With_context auto change to ucontext")
 endif(with_context MATCHES "auto")
 
 if(with_context MATCHES "ucontext")
@@ -319,10 +277,10 @@ if(with_context MATCHES "ucontext")
        else(mcsc)
                if(windows_context MATCHES "yes")
                        set(with_context "windows")
-                       message("with_context ucontext change to windows")
+                       message("-- With_context ucontext change to windows")
                else(windows_context MATCHES "yes")
                        set(with_context "pthread")
-                       message("with_context ucontext change to pthread")
+                       message("-- With_context ucontext change to pthread")
                endif(windows_context MATCHES "yes")
        endif(mcsc)
 endif(with_context MATCHES "ucontext")
@@ -349,7 +307,7 @@ endif(NOT with_context_ok)
 if(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/.svn)
        find_file(SVN ".svn" ${CMAKE_HOME_DIRECTORY})
        exec_program("svnversion ${CMAKE_HOME_DIRECTORY}" OUTPUT_VARIABLE "SVN_VERSION")
-       message("SVN_VERSION : ${SVN_VERSION}")
+       message("-- svn version ${SVN_VERSION}")
 endif(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/.svn)
 
 if(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/.git)
index fde8bec..39ba55b 100644 (file)
@@ -167,7 +167,7 @@ endif(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND IC
 
 ##############################################################################"
 
-message("Check individual TOCs")
+message("-- Check individual TOCs")
 file(GLOB_RECURSE LISTE_GTUT
        "${CMAKE_HOME_DIRECTORY}/doc/gtut-tour-*.doc"
 )
@@ -204,7 +204,7 @@ foreach(file_name ${LISTE_GTUT})
        
        exec_program("${CMAKE_COMMAND} -E compare_files ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc" OUTPUT_VARIABLE compare_files)
        if(compare_files)
-               message("Wrong toc for ${file_name}. Should be:")
+               message("-- Wrong toc for ${file_name}. Should be:")
                file(READ "${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc" file_content)
                message("${file_content}")
                exec_program("diff -u ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc")
@@ -214,7 +214,7 @@ endforeach(file_name ${LISTE_GTUT})
 file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc)
 file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc)
 
-message("Check main TOC")
+message("-- Check main TOC")
 
 foreach(file_name ${LISTE_GTUT})
        file(READ "${file_name}" file_content)  
@@ -254,7 +254,7 @@ endforeach(line ${file_content})
        
 exec_program("${CMAKE_COMMAND} -E compare_files ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc" OUTPUT_VARIABLE compare_files)
 if(compare_files)
-       message("Wrong toc for gtut-tour.doc Right one is in tmp.realtoc")
+       message("-- Wrong toc for gtut-tour.doc Right one is in tmp.realtoc")
        exec_program("diff -u ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc")
 else(compare_files)
        file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc)
index c101fdc..e5a941d 100644 (file)
@@ -21,7 +21,15 @@ IF(FLEXML_EXE)
        string(REGEX MATCH "[0-9]*$" FLEXML_MINOR_VERSION "${FLEXML_VERSION}")
 ENDIF(FLEXML_EXE)
 
+message("-- Found flex: ${FLEX_EXE}")
+message("-- Found flexml: ${FLEXML_EXE}")
+message("-- Found sed: ${SED_EXE}")
+
 if(HAVE_FLEXML AND HAVE_FLEX AND SED_EXE)
+
+message("-- Flex version: ${FLEX_MAJOR_VERSION}.${FLEX_MINOR_VERSION}.${FLEX_PATCH_VERSION}")
+message("-- Flexml version: ${FLEXML_MAJOR_VERSION}.${FLEXML_MINOR_VERSION}")
+
 set(string1  "'s/extern  *\\([^ ]*[ \\*]*\\)/XBT_PUBLIC_DATA(\\1) /'")
 set(string2  "'s/XBT_PUBLIC_DATA(\\([^)]*\\)) *\\([^(]*\\)(/XBT_PUBLIC(\\1) \\2(/'")
 set(string3  "'s/extern  *\\([^ ]*[ \\*]*\\)/XBT_PUBLIC_DATA(\\1) /'")
@@ -115,23 +123,18 @@ ADD_CUSTOM_COMMAND(
                                                )
 
 else(HAVE_FLEXML AND HAVE_FLEX  AND SED_EXE)
-       message("  FLEX :       ${FLEX_EXE}")
-       message("FLEXML :       ${FLEXML_EXE}")
-       message("   SED :       ${SED_EXE}")
-       
        if(NOT HAVE_FLEXML)
-               message("Install flexml before use maintainer mode.")
+               message("-- Error : Install flexml before use maintainer mode.")
        endif(NOT HAVE_FLEXML)
        if(NOT HAVE_FLEX)
-               message("Install flex before use maintainer mode.")
+               message("-- Error : Install flex before use maintainer mode.")
        endif(NOT HAVE_FLEX)
        if(NOT SED_EXE)
-               message("Install sed before use maintainer mode.")
+               message("-- Error : Install sed before use maintainer mode.")
        endif(NOT SED_EXE)
        
-       message(FATAL_ERROR "Need to install all tools for maintainer mode !!!")
+       message(FATAL_ERROR "-- Error : Need to install all tools for maintainer mode !!!")
 endif(HAVE_FLEXML AND HAVE_FLEX  AND SED_EXE)
 
-
 endif(enable_maintainer_mode AND NOT WIN32)
 
index 16b1883..5736d3c 100644 (file)
@@ -38,6 +38,24 @@ if(HAVE_F2C_H)
 set(HAVE_SMPI_F2C_H 1)
 endif(HAVE_F2C_H)
 
+message("-- Looking for f2c.h")
+if(HAVE_F2C_H)
+message("-- Looking for f2c.h - found")
+else(HAVE_F2C_H)
+message("-- Looking for f2c.h - not found")
+endif(HAVE_F2C_H)
+
+message("-- Looking for lib f2c")
+if(HAVE_F2C_LIB)
+message("-- Looking for lib f2c - found")
+else(HAVE_F2C_LIB)
+message("-- Looking for lib f2c - not found")
+endif(HAVE_F2C_LIB)
+
+if(F2C_EXE)
+message("-- Found F2C: ${F2C_EXE}")
+endif(F2C_EXE)
+
 mark_as_advanced(HAVE_F2C_H)
 mark_as_advanced(F2C_EXE)
 mark_as_advanced(HAVE_F2C_LIB)
\ No newline at end of file
index ba664ae..fcb2ec5 100644 (file)
@@ -152,4 +152,53 @@ endif(HAVE_CGRAPH_LIB OR HAVE_AGRAPH_LIB)
 
 endif(HAVE_CDT_LIB)
 
-mark_as_advanced(HAVE_GRAPHVIZ)
\ No newline at end of file
+mark_as_advanced(HAVE_GRAPHVIZ)
+
+message("-- Looking for agraph.h")
+if(HAVE_AGRAPH_H)
+message("-- Looking for agraph.h - found")
+else(HAVE_AGRAPH_H)
+message("-- Looking for agraph.h - not found")
+endif(HAVE_AGRAPH_H)
+
+message("-- Looking for cgraph.h")
+if(HAVE_CGRAPH_H)
+message("-- Looking for cgraph.h - found")
+else(HAVE_CGRAPH_H)
+message("-- Looking for cgraph.h - not found")
+endif(HAVE_CGRAPH_H)
+
+message("-- Looking for graph.h")
+if(HAVE_GRAPH_H)
+message("-- Looking for graph.h - found")
+else(HAVE_GRAPH_H)
+message("-- Looking for graph.h - not found")
+endif(HAVE_GRAPH_H)
+
+message("-- Looking for lib agraph")
+if(HAVE_AGRAPH_LIB)
+message("-- Looking for lib agraph - found")
+else(HAVE_AGRAPH_LIB)
+message("-- Looking for lib agraph - not found")
+endif(HAVE_AGRAPH_LIB)
+
+message("-- Looking for lib cgraph")
+if(HAVE_CGRAPH_LIB)
+message("-- Looking for lib cgraph - found")
+else(HAVE_CGRAPH_LIB)
+message("-- Looking for lib cgraph - not found")
+endif(HAVE_CGRAPH_LIB)
+
+message("-- Looking for lib graph")
+if(HAVE_GRAPH_LIB)
+message("-- Looking for lib graph - found")
+else(HAVE_GRAPH_LIB)
+message("-- Looking for lib graph - not found")
+endif(HAVE_GRAPH_LIB)
+
+message("-- Looking for lib cdt")
+if(HAVE_CDT_LIB)
+message("-- Looking for lib cdt - found")
+else(HAVE_CDT_LIB)
+message("-- Looking for lib cdt - not found")
+endif(HAVE_CDT_LIB)
\ No newline at end of file
index 359a921..efe9316 100644 (file)
@@ -55,4 +55,23 @@ mark_as_advanced(HAVE_LUA5_1_LAUXLIB_H)
 mark_as_advanced(HAVE_LUA5_1_LUALIB_H)
 mark_as_advanced(HAVE_LUA51_LIB)                                                                                                                                                                             
 mark_as_advanced(HAVE_LUA_H)
-mark_as_advanced(HAVE_LUA_BIN)
\ No newline at end of file
+mark_as_advanced(HAVE_LUA_BIN)
+
+message("-- Looking for lua.h")
+if(HAVE_LUA_H)
+message("-- Looking for lua.h - found")
+else(HAVE_LUA_H)
+message("-- Looking for lua.h - not found")
+endif(HAVE_LUA_H)
+
+message("-- Looking for lib lua")
+if(HAVE_LUA51_LIB)
+message("-- Looking for lib lua - found")
+message("-- Lib lua version: ${LIB_LUA_NAME}")
+else(HAVE_LUA51_LIB)
+message("-- Looking for lib lua - not found")
+endif(HAVE_LUA51_LIB)
+
+if(HAVE_LUA_BIN)
+message("-- Found Lua: ${HAVE_LUA_BIN}")
+endif(HAVE_LUA_BIN)
\ No newline at end of file
diff --git a/buildtools/Cmake/Modules/FindPCRE.cmake b/buildtools/Cmake/Modules/FindPCRE.cmake
new file mode 100644 (file)
index 0000000..eac7742
--- /dev/null
@@ -0,0 +1,53 @@
+find_library(PATH_PCRE_LIB 
+       NAMES pcre
+    HINTS
+    $ENV{LD_LIBRARY_PATH}
+    PATH_SUFFIXES lib/
+    PATHS
+    /opt
+    /opt/local
+    /opt/csw
+    /sw
+    /usr)
+    
+find_path(PATH_PCRE_H "pcre.h"
+    HINTS
+    $ENV{LD_LIBRARY_PATH}
+    PATH_SUFFIXES include/
+    PATHS
+    /opt
+    /opt/local
+    /opt/csw
+    /sw
+    /usr)
+    
+set(HAVE_PCRE_LIB 0)
+if(PATH_PCRE_LIB AND PATH_PCRE_H)
+       string(REGEX REPLACE "/libpcre.*[.]${LIB_EXE}$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
+       string(REGEX REPLACE "/pcre.h" "" PATH_PCRE_H "${PATH_PCRE_H}")
+       string(REGEX MATCH "-L${PATHLIBPCRE} " operation "${CMAKE_C_FLAGS}")
+          if(NOT operation)
+                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${PATHLIBPCRE} ")
+          endif(NOT operation)
+          string(REGEX MATCH "-I${PATH_PCRE_H} " operation "${CMAKE_C_FLAGS}")
+          if(NOT operation)
+                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${PATH_PCRE_H} ")
+          endif(NOT operation)    
+       set(HAVE_PCRE_LIB 1)
+else(PATH_PCRE_LIB)
+               message("-- Warning : You should install libpcre (please install the libpcre3-dev package or equivalent)")
+endif(PATH_PCRE_LIB AND PATH_PCRE_H)
+    
+message("-- Looking for pcre.h")
+if(PATH_PCRE_H)
+message("-- Looking for pcre.h - found")
+else(PATH_PCRE_H)
+message("-- Looking for pcre.h - not found")
+endif(PATH_PCRE_H)
+
+message("-- Looking for lib pcre")
+if(PATH_PCRE_LIB)
+message("-- Looking for lib pcre - found")
+else(PATH_PCRE_LIB)
+message("-- Looking for lib pcre - not found")
+endif(PATH_PCRE_LIB)
\ No newline at end of file
diff --git a/buildtools/Cmake/Modules/FindRubySimgrid.cmake b/buildtools/Cmake/Modules/FindRubySimgrid.cmake
new file mode 100644 (file)
index 0000000..389a003
--- /dev/null
@@ -0,0 +1,54 @@
+include(FindRuby)
+
+if(RUBY_LIBRARY)
+       set(LIB_RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
+       if(RUBY_VERSION_MAJOR MATCHES "1" AND RUBY_VERSION_MINOR MATCHES "9")
+               string(REGEX MATCH "ruby.*[0-9]" RUBY_LIBRARY_NAME ${RUBY_LIBRARY})
+               if(NOT RUBY_LIBRARY_NAME)
+                       set(RUBY_LIBRARY_NAME ruby)
+               endif(NOT RUBY_LIBRARY_NAME)
+               string(REGEX REPLACE "/libruby.*$" "" RUBY_LIBRARY ${RUBY_LIBRARY})
+               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${RUBY_CONFIG_INCLUDE_DIR} ") #path to config.h
+               string(COMPARE EQUAL "${RUBY_INCLUDE_DIR}" "${RUBY_CONFIG_INCLUDE_DIR}" operation)
+               if(NOT operation)
+                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${RUBY_INCLUDE_DIR} ") #path to ruby.h
+               endif(NOT operation)
+               ADD_DEFINITIONS("-I${CMAKE_HOME_DIRECTORY}/src/bindings/ruby -I${CMAKE_HOME_DIRECTORY}/src/simix")
+               SET(HAVE_RUBY 1)
+       else(RUBY_VERSION_MAJOR MATCHES "1" AND RUBY_VERSION_MINOR MATCHES "9")
+               message("-- Warning : Ruby binding need version 1.9.x actually version ${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.x")
+               SET(HAVE_RUBY 0)
+       endif(RUBY_VERSION_MAJOR MATCHES "1" AND RUBY_VERSION_MINOR MATCHES "9")
+else(RUBY_LIBRARY)
+       SET(HAVE_RUBY 0)
+endif(RUBY_LIBRARY)
+
+if(NOT RUBY_EXECUTABLE)
+       message("-- Warning : you don't have ruby executable so you can compile and build examples but can't execute them!!!") 
+endif(NOT RUBY_EXECUTABLE)
+
+if(RUBY_EXECUTABLE)
+       message("-- Found ruby: ${RUBY_EXECUTABLE}")
+endif(RUBY_EXECUTABLE)
+
+message("-- Looking for ruby.h")
+if(RUBY_INCLUDE_DIR)
+message("-- Looking for ruby.h - found")
+else(RUBY_INCLUDE_DIR)
+message("-- Looking for ruby.h - not found")
+endif(RUBY_INCLUDE_DIR)
+
+message("-- Looking for confi.h")
+if(RUBY_CONFIG_INCLUDE_DIR)
+message("-- Looking for config.h - found")
+else(RUBY_CONFIG_INCLUDE_DIR)
+message("-- Looking for config.h - not found")
+endif(RUBY_CONFIG_INCLUDE_DIR)
+
+message("-- Looking for lib ruby")
+if(RUBY_LIBRARY)
+message("-- Looking for lib ruby - found")
+message("-- Lib ruby version: ${LIB_RUBY_VERSION}")
+else(RUBY_LIBRARY)
+message("-- Looking for lib ruby - not found")
+endif(RUBY_LIBRARY)
\ No newline at end of file
index 1754f69..7b8a83e 100644 (file)
@@ -7,10 +7,6 @@
        #${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules
        #)
 
-message("GRAS_ROOT     = $ENV{GRAS_ROOT}")
-message("SIMGRID_ROOT  = $ENV{SIMGRID_ROOT}")
-message("LD_LIBRARY_PATH       = $ENV{LD_LIBRARY_PATH}")
-
 find_library(HAVE_SIMGRID_LIB
     NAME simgrid
     HINTS
@@ -67,7 +63,24 @@ find_program(HAVE_GRAS_STUB
        /usr
 )
 
-message("HAVE_SIMGRID_LIB      = ${HAVE_SIMGRID_LIB}")
-message("HAVE_GRAS_H           = ${HAVE_GRAS_H}")
-message("HAVE_TESH             = ${HAVE_TESH}")
-message("HAVE_GRAS_STUB                = ${HAVE_GRAS_STUB}")
\ No newline at end of file
+message("-- Looking for lib SimGrid")
+if(HAVE_SIMGRID_LIB)
+message("-- Looking for lib SimGrid - found")
+else(HAVE_SIMGRID_LIB)
+message("-- Looking for lib SimGrid - not found")
+endif(HAVE_SIMGRID_LIB)
+
+message("-- Looking for gras.h")
+if(HAVE_GRAS_H)
+message("-- Looking for gras.h - found")
+else(HAVE_GRAS_H)
+message("-- Looking for gras.h - not found")
+endif(HAVE_GRAS_H)
+
+if(HAVE_TESH)
+message("-- Found Tesh: ${HAVE_TESH}")
+endif(HAVE_TESH)
+
+if(HAVE_GRAS_STUB)
+message("-- Found gras_stub_generator: ${HAVE_GRAS_STUB}")
+endif(HAVE_GRAS_STUB)
\ No newline at end of file
diff --git a/buildtools/Cmake/Modules/FindValgrind.cmake b/buildtools/Cmake/Modules/FindValgrind.cmake
new file mode 100644 (file)
index 0000000..d64ccfa
--- /dev/null
@@ -0,0 +1,33 @@
+find_program(VALGRIND_EXE 
+       NAME valgrind
+    PATH_SUFFIXES bin/
+    PATHS
+    /opt
+    /opt/local
+    /opt/csw
+    /sw
+    /usr
+)
+
+if(VALGRIND_EXE)
+message("-- Found valgrind: ${VALGRIND_EXE}")
+SET(VALGRIND_COMMAND "${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/my_valgrind.pl")
+SET(MEMORYCHECK_COMMAND "${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/my_valgrind.pl")
+endif(VALGRIND_EXE)
+
+if(VALGRIND_EXE)
+       exec_program("${VALGRIND_EXE} --version " OUTPUT_VARIABLE "VALGRIND_VERSION")
+       string(REGEX MATCH "[0-9].[0-9].[0-9]" NEW_VALGRIND_VERSION "${VALGRIND_VERSION}")
+       if(NEW_VALGRIND_VERSION)
+               message("-- Valgrind version: ${NEW_VALGRIND_VERSION}")
+               exec_program("${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/generate_memcheck_tests.pl ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/AddTests.cmake > ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/memcheck_tests.cmake" OUTPUT_VARIABLE SHUTT)
+               set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-reachable=yes --track-origins=yes --read-var-info=no")
+               message("-- Valgrind options: ${MEMORYCHECK_COMMAND_OPTIONS}")
+       else(NEW_VALGRIND_VERSION)
+               set(enable_memcheck false)
+               message("-- Error: Command valgrind not found --> enable_memcheck autoset to false.")
+       endif(NEW_VALGRIND_VERSION)
+else(VALGRIND_EXE)
+       set(enable_memcheck false)
+       message(FATAL_ERROR "Command valgrind not found --> enable_memcheck autoset to false.")
+endif(VALGRIND_EXE)
\ No newline at end of file
index 693fdec..c56c23b 100644 (file)
@@ -65,10 +65,12 @@ IF(pipol_user)
 
     MESSAGE(STATUS "Pipol user is ${pipol_user}")
     IF(HAVE_SSH)
+       message("-- Found ssh: ${HAVE_SSH}")
       # get pipol systems
       EXECUTE_PROCESS(COMMAND 
         ssh ${pipol_user}@pipol.inria.fr pipol-sub --query=systems 
         OUTPUT_VARIABLE PIPOL_SYSTEMS OUTPUT_STRIP_TRAILING_WHITESPACE)
+        
     ENDIF(HAVE_SSH)
   
        ADD_CUSTOM_TARGET(pipol_test_list_images
@@ -88,7 +90,7 @@ IF(pipol_user)
                )
   
     IF(HAVE_RSYNC)
-             
+       message("-- Found rsync: ${HAVE_RSYNC}")
              MACRO(PIPOL_TARGET
                  SYSTEM_PATTERN)
                                  STRING(REPLACE ".dd.gz" "" SYSTEM_TARGET ${SYSTEM_PATTERN})
@@ -165,6 +167,7 @@ ADD_CUSTOM_TARGET(pipol_kill_all_jobs
                COMMENT "PIPOL delete all jobs"
                COMMAND ./pipol-sub --pipol-user=${pipol_user} deleteallmyjobs
                )
-
-
+               
+message("-- Pipol options: ${CMAKE_OPTIONS}")
+               
 ENDIF(pipol_user)
\ No newline at end of file
index 1c8cdb4..669e4a0 100644 (file)
@@ -21,7 +21,6 @@ if(enable_print_message)
        message("")
        message("________________________________________________________________________________")
        message("________________________________________________________________________________ DEBUG")
-       message("simgrid_BINARY_DIR   : ${simgrid_BINARY_DIR}")
        message("CMAKE_HOME_DIRECTORY : ${CMAKE_HOME_DIRECTORY}")
        message("")
        message("SIZEOF_MAX :                   ${SIZEOF_MAX}")
@@ -86,83 +85,6 @@ if(enable_print_message)
        message("HAVE_ASPRINTF                  ${HAVE_ASPRINTF}")
        message("HAVE_VASPRINTF                 ${HAVE_VASPRINTF}")
        message("HAVE_MMAP                      ${HAVE_MMAP}")
-       if(enable_ruby)
-       message("")
-       message("RUBY_EXE :                     ${RUBY_EXECUTABLE}")
-       message("RUBY.H :                       ${RUBY_INCLUDE_DIR}")
-       message("CONFIG.H :                     ${RUBY_CONFIG_INCLUDE_DIR}")
-       message("LIB_RUBY :                     ${RUBY_LIBRARY}")
-       message("LIB_RUBY_VERSION :             ${LIB_RUBY_VERSION}")
-       endif(enable_ruby)
-       if(enable_java)
-       message("")
-       message("JNI.H :                        ${JAVA_INCLUDE_PATH}")
-       message("JNI_MD.H :                     ${JAVA_INCLUDE_PATH2}")
-       message("JAVAC :                        ${JAVA_COMPILE}")
-       message("JAVA_ARCHIVE :                         ${JAVA_ARCHIVE}")
-       endif(enable_java)
-       if(enable_lua)
-       message("")
-    message("HAVE_LUA_H = ${HAVE_LUA_H}")
-    message("HAVE_LUA51_LIB = ${HAVE_LUA51_LIB}")
-    message("LUA_INCLUDE_DIR = ${LUA_INCLUDE_DIR}")
-    message("LIB_LUA_NAME = ${LIB_LUA_NAME}")
-    message("LUA_LIBRARY_DIR = ${LUA_LIBRARY_DIR}")
-    message("LUA_BIN = ${HAVE_LUA_BIN}")
-    
-       endif(enable_lua)
-       if(enable_memcheck)
-       message("")
-       message("VALGRIND :                     ${NEW_VALGRIND_VERSION}")
-       message("VALGRIND :                     ${VALGRIND_COMMAND}")
-       message("OPTIONS :                      ${MEMORYCHECK_COMMAND_OPTIONS}")
-       message("PERL :                         ${PERL_EXECUTABLE}")
-       endif(enable_memcheck)
-       if(enable_model-checking)
-       message("")
-       message("HAVE_MMAP :                    ${HAVE_MMAP}")
-       message("HAVE_MC :                      ${HAVE_MC}")
-       message("MMALLOC_WANT_OVERIDE_LEGACY :  ${MMALLOC_WANT_OVERIDE_LEGACY}")
-       endif(enable_model-checking)
-       if(enable_maintainer_mode)
-       message("")
-       message("FLEX :                         ${FLEX_EXE}")
-       message("FLEX_VERSION :                 ${FLEX_MAJOR_VERSION}.${FLEX_MINOR_VERSION}.${FLEX_PATCH_VERSION}")
-       message("FLEXML :                       ${FLEXML_EXE}")
-       message("FLEXML_VERSION :               ${FLEXML_MAJOR_VERSION}.${FLEXML_MINOR_VERSION}")
-       message("SED :                          ${SED_EXE}")
-       message("PERL :                                 ${PERL_EXECUTABLE}")
-       endif(enable_maintainer_mode)
-       if(HAVE_GRAPHVIZ)
-       message("")
-       message("libcdt    :                    ${HAVE_CDT_LIB}")
-       message("libagraph :                    ${HAVE_AGRAPH_LIB}")
-       message("agraph.h  :                    ${HAVE_AGRAPH_H}")
-    message("libcgraph :                       ${HAVE_CGRAPH_LIB}")
-    message("cgraph.h  :                       ${HAVE_CGRAPH_H}") 
-    message("libgraph  :                       ${HAVE_GRAPH_LIB}")
-    message("graph.h   :                       ${HAVE_GRAPH_H}") 
-    endif(HAVE_GRAPHVIZ)
-       if(pipol_user)
-       message("")
-       message("ssh:                           ${HAVE_SSH}")
-       message("rsync:                         ${HAVE_RSYNC}")
-       message("options:                       ${CMAKE_OPTIONS}")
-       endif(pipol_user)
-       if(HAVE_PCRE_LIB)
-       message("")
-    message("LIBPCRE : ${PATH_PCRE_LIB}")
-    message("PATH_LIBPCRE : ${PATHLIBPCRE}")
-    message("PATH_PCRE_H  : ${PATH_PCRE_H}")
-       endif(HAVE_PCRE_LIB)
-       if(enable_smpi)
-       message("")
-       message("HAVE_F2C_H     : ${HAVE_F2C_H}")
-       message("F2C_EXE                : ${F2C_EXE}")
-       message("HAVE_F2C_LIB   : ${HAVE_F2C_LIB}")
-       endif(enable_smpi)
-    message("")
-    message("LIB_EXE : ${LIB_EXE}")
        message("________________________________________________________________________________")
        message("________________________________________________________________________________ DEBUG END")
        message("")