From: navarro Date: Wed, 28 Mar 2012 08:48:35 +0000 (+0200) Subject: Update documentation for MSG_USE_DEPRECATED and add option to cmake. X-Git-Tag: v3_7~190 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fdee9639e4620a7eee7e7e1b39443df01f4886cf?hp=3119cbc65eaf6635be81c0c71a4ea832097a7fb5 Update documentation for MSG_USE_DEPRECATED and add option to cmake. --- diff --git a/buildtools/Cmake/Flags.cmake b/buildtools/Cmake/Flags.cmake index a87ec9ed82..b5dcd8019d 100644 --- a/buildtools/Cmake/Flags.cmake +++ b/buildtools/Cmake/Flags.cmake @@ -33,9 +33,13 @@ if(APPLE AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6") endif(APPLE AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6") if(NOT enable_debug) - set(CMAKE_C_FLAGS "-DNDEBUG ${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS "-DNDEBUG ${CMAKE_C_FLAGS}") endif(NOT enable_debug) +if(enable_msg_deprecated) + set(CMAKE_C_FLAGS "-DMSG_USE_DEPRECATED ${CMAKE_C_FLAGS}") +endif(enable_msg_deprecated) + set(CMAKE_C_FLAGS "${optCFLAGS}${warnCFLAGS}${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${custom_flags}") diff --git a/buildtools/Cmake/Option.cmake b/buildtools/Cmake/Option.cmake index 8f883d62bc..6e64b98a02 100644 --- a/buildtools/Cmake/Option.cmake +++ b/buildtools/Cmake/Option.cmake @@ -33,6 +33,7 @@ option(enable_lib_static "" off) option(enable_jedule "Jedule output of SimDAG." off) option(enable_debug "Turn this off to remove all debug messages at compile time (faster, but no debug activable)" on) option(enable_supernovae "Whether Supernovae mode (helping compiler optimization) is activated." on) +option(enable_msg_deprecated "This option enable the use of msg deprecated functions" off) #if(enable_supernovae AND enable_model-checking) # set(enable_model-checking OFF CACHE TYPE INTERNAL FORCE) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 756f2755f5..5833484ee4 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1550,7 +1550,8 @@ PREDEFINED = DOXYGEN \ DOXYGEN_SKIP_IT \ XBT_PUBLIC= \ XBT_INLINE= \ - HAVE_TRACING + HAVE_TRACING \ + MSG_USE_DEPRECATED # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. diff --git a/doc/FAQ.doc b/doc/FAQ.doc index 42e6649d16..93f752db5f 100644 --- a/doc/FAQ.doc +++ b/doc/FAQ.doc @@ -714,6 +714,46 @@ of SimGrid -- see \ref faq_more_processes), you must absolutely specify -lpthread on the linker command line. As usual, this should come after -lsimgrid on this command line. +\subsubsection faq_trouble_lib_msg_deprecated "gcc: undefined reference to MSG_*" + +Since version 3.7 all the #m_channel_t mecanism is deprecated. So functions +about this mecanism may get removed in future releases. + +List of functions: + +\li XBT_PUBLIC(int) MSG_get_host_number(void); + +\li XBT_PUBLIC(m_host_t *) MSG_get_host_table(void); + +\li XBT_PUBLIC(MSG_error_t) MSG_get_errno(void); + +\li XBT_PUBLIC(MSG_error_t) MSG_task_get(m_task_t * task, m_channel_t channel); + +\li XBT_PUBLIC(MSG_error_t) MSG_task_get_with_timeout(m_task_t * task, m_channel_t channel, double max_duration); + +\li XBT_PUBLIC(MSG_error_t) MSG_task_get_from_host(m_task_t * task, int channel, m_host_t host); + +\li XBT_PUBLIC(MSG_error_t) MSG_task_get_ext(m_task_t * task, int channel, double max_duration, m_host_t host); + +\li XBT_PUBLIC(MSG_error_t) MSG_task_put(m_task_t task, m_host_t dest, m_channel_t channel); + +\li XBT_PUBLIC(MSG_error_t) MSG_task_put_bounded(m_task_t task, m_host_t dest, m_channel_t channel, double max_rate); + +\li XBT_PUBLIC(MSG_error_t) MSG_task_put_with_timeout(m_task_t task, m_host_t dest, m_channel_t channel, double max_duration); + +\li XBT_PUBLIC(int) MSG_task_Iprobe(m_channel_t channel); + +\li XBT_PUBLIC(int) MSG_task_probe_from(m_channel_t channel); + +\li XBT_PUBLIC(int) MSG_task_probe_from_host(int channel, m_host_t host); + +\li XBT_PUBLIC(MSG_error_t) MSG_set_channel_number(int number); + +\li XBT_PUBLIC(int) MSG_get_channel_number(void); + +If you want them you have to compile Simgrid v3.7 with option "-Denable_msg_deprecated=ON". +Using them should print warning to inform what new function you have to use. + \subsection faq_trouble_errors Runtime error messages \subsubsection faq_flexml_limit "surf_parse_lex: Assertion `next limit' failed." diff --git a/doc/install.doc b/doc/install.doc index adc5f5f063..0b632d46bb 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -37,6 +37,7 @@ For Windows : "cmake -D[name]=[value] ... ./" [name] enable_gtnets [value] ON/OFF or TRUE/FALSE or 1/0 + enable_ns3 ON/OFF or TRUE/FALSE or 1/0 enable_lua ON/OFF or TRUE/FALSE or 1/0 enable_compile_optimizations ON/OFF or TRUE/FALSE or 1/0 enable_compile_warnings ON/OFF or TRUE/FALSE or 1/0 @@ -50,8 +51,12 @@ For Windows : enable_jedule ON/OFF or TRUE/FALSE or 1/0 enable_latency_bound_tracking ON/OFF or TRUE/FALSE or 1/0 enable_lib_static ON/OFF or TRUE/FALSE or 1/0 + enable_supernovae ON/OFF or TRUE/FALSE or 1/0 + enable_msg_deprecated ON/OFF or TRUE/FALSE or 1/0 + enable_print_message ON/OFF or TRUE/FALSE or 1/0 custom_flags gtnets_path + ns3_path CMAKE_INSTALL_PREFIX CMAKE_C_COMPILER CMAKE_CXX_COMPILER @@ -61,6 +66,8 @@ For Windows : \subsubsection install_cmakeoption2 Options explaination \li enable_gtnets : set to true implie that user wants to use gtnets. + + \li enable_ns3 : set to true implie that user wants to use ns3. \li enable_lua : set to true implie that user wants to add lua langage into simgrid compilation. @@ -86,11 +93,19 @@ For Windows : \li enable_latency_bound_tracking : Set to on if you want to be warned when communications are limited by round trip time. - \li enable_lib_static : Enable generated Simgrid and smpi static libraries. + \li enable_lib_static : Enable generated Simgrid and smpi static libraries. + + \li enable_supernovae : Set to true make one file for each lib and compile with those generated files. + + \li enable_msg_deprecated : Simgrid is compiled with msg deprecated functions. + + \li enable_print_message : When set to true configuration print more debug output. \li custom_flags : If user wants to use a specific flag during compilation, give here. \li gtnets_path : Path to gtnets install directory (ex /usr) + + \li ns3_path : Path to ns3 install directory (ex /usr) \li CMAKE_INSTALL_PREFIX : Path where are installed lib/ doc/ and include/ directories (ex /usr/local)