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)
### 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)
+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")
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")
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)
${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)
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)
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)
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
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")
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")
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)
##############################################################################"
-message("Check individual TOCs")
+message("-- Check individual TOCs")
file(GLOB_RECURSE LISTE_GTUT
"${CMAKE_HOME_DIRECTORY}/doc/gtut-tour-*.doc"
)
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")
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)
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)
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) /'")
)
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)
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
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
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
--- /dev/null
+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
--- /dev/null
+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
#${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
/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
--- /dev/null
+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
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
)
IF(HAVE_RSYNC)
-
+ message("-- Found rsync: ${HAVE_RSYNC}")
MACRO(PIPOL_TARGET
SYSTEM_PATTERN)
STRING(REPLACE ".dd.gz" "" SYSTEM_TARGET ${SYSTEM_PATTERN})
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
message("")
message("________________________________________________________________________________")
message("________________________________________________________________________________ DEBUG")
- message("simgrid_BINARY_DIR : ${simgrid_BINARY_DIR}")
message("CMAKE_HOME_DIRECTORY : ${CMAKE_HOME_DIRECTORY}")
message("")
message("SIZEOF_MAX : ${SIZEOF_MAX}")
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("")