From: schnorr Date: Thu, 1 Apr 2010 14:17:02 +0000 (+0000) Subject: proper use of the HAVE_TRACING variable defined by Cmake through -Dtracing=on X-Git-Tag: SVN~317 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a182030b5a8c0db05a1de18ca230b61e76363ebc proper use of the HAVE_TRACING variable defined by Cmake through -Dtracing=on details: - cleaning some code (instr/config.h) that was autotools-related - created a Cmake rule to create a tracing_config.h that contains the preprocessor variable HAVE_TRACING - msg/datatypes.h and instr/instr.h needs to include tracing_config.h to not segfault because of the size of the task struct - .gitignore updated git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7423 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/.gitignore b/.gitignore index 2bb0937887..a12ebed68f 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ make_simgrid_java.sh testgraph.dot testgraph.xml buildtools/Cmake/src/tmp_gras_config.h.in +buildtools/Cmake/src/tmp_tracing_config.h.in conftestval cmake_install.cmake CMakeFiles @@ -85,6 +86,7 @@ ltmain.sh autom4te.cache/* doc/Doxyfile include/simgrid_config.h +include/instr/tracing_config.h examples/amok/bandwidth/bandwidth_maestro examples/amok/bandwidth/bandwidth_sensor examples/amok/saturate/saturate_maestro diff --git a/buildtools/Cmake/src/CMakeCompleteInFiles.txt b/buildtools/Cmake/src/CMakeCompleteInFiles.txt index 95dd3920f5..0a6b5df3c6 100644 --- a/buildtools/Cmake/src/CMakeCompleteInFiles.txt +++ b/buildtools/Cmake/src/CMakeCompleteInFiles.txt @@ -650,6 +650,8 @@ SET( CMAKEDEFINE "#cmakedefine" ) configure_file("${PROJECT_DIRECTORY}/buildtools/Cmake/src/c_gras_config.h.in" "${PROJECT_DIRECTORY}/buildtools/Cmake/src/tmp_gras_config.h.in" @ONLY IMMEDIATE) configure_file("${PROJECT_DIRECTORY}/buildtools/Cmake/src/tmp_gras_config.h.in" "${PROJECT_DIRECTORY}/src/gras_config.h" @ONLY IMMEDIATE) configure_file(${PROJECT_DIRECTORY}/include/simgrid_config.h.in ${PROJECT_DIRECTORY}/include/simgrid_config.h) +configure_file("${PROJECT_DIRECTORY}/buildtools/Cmake/src/tracing_config.h.in" "${PROJECT_DIRECTORY}/buildtools/Cmake/src/tmp_tracing_config.h.in" @ONLY IMMEDIATE) +configure_file("${PROJECT_DIRECTORY}/buildtools/Cmake/src/tmp_tracing_config.h.in" "${PROJECT_DIRECTORY}/include/instr/tracing_config.h" @ONLY IMMEDIATE) if(NOT prefix) set(prefix /usr/local) diff --git a/buildtools/Cmake/src/tracing_config.h.in b/buildtools/Cmake/src/tracing_config.h.in new file mode 100644 index 0000000000..1aa5f02841 --- /dev/null +++ b/buildtools/Cmake/src/tracing_config.h.in @@ -0,0 +1,19 @@ +/* + * tracing_config.h + * + * Created on: Apri 1, 2010 + * Author: Lucas Schnorr + * License: This program is free software; you can redistribute + * it and/or modify it under the terms of the license + * (GNU LGPL) which comes with this package. + * + * Copyright (c) 2009 The SimGrid team. + */ + +#ifndef __TRACING_CONFIG_H +#define __TRACING_CONFIG_H + +/* Tracing SimGrid */ +#cmakedefine HAVE_TRACING @HAVE_TRACING@ + +#endif diff --git a/include/instr/config.h b/include/instr/config.h deleted file mode 100644 index 759579ec9f..0000000000 --- a/include/instr/config.h +++ /dev/null @@ -1,3 +0,0 @@ -/* include/instr/config.h. Generated from config.h.in by configure. */ -/* defines whether instrumentation must be compiled or not */ -#define HAVE_TRACING 1 diff --git a/include/instr/config.h.in b/include/instr/config.h.in deleted file mode 100644 index f2f159d05c..0000000000 --- a/include/instr/config.h.in +++ /dev/null @@ -1,2 +0,0 @@ -/* defines whether instrumentation must be compiled or not */ -#undef HAVE_TRACING diff --git a/include/instr/instr.h b/include/instr/instr.h index 17715d2b68..8b87e2ff5a 100644 --- a/include/instr/instr.h +++ b/include/instr/instr.h @@ -13,7 +13,7 @@ #ifndef INSTR_H_ #define INSTR_H_ -#include "instr/config.h" +#include "instr/tracing_config.h" #ifdef HAVE_TRACING diff --git a/include/msg/datatypes.h b/include/msg/datatypes.h index 0446f96488..255b1558d5 100644 --- a/include/msg/datatypes.h +++ b/include/msg/datatypes.h @@ -8,7 +8,7 @@ #ifndef MSG_DATATYPE_H #define MSG_DATATYPE_H #include "xbt/misc.h" -#include "instr/config.h" +#include "instr/tracing_config.h" // for HAVE_TRACING SG_BEGIN_DECL() diff --git a/src/instr/general.c b/src/instr/general.c index d7f002b768..3e0dc11c73 100644 --- a/src/instr/general.c +++ b/src/instr/general.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #ifdef HAVE_TRACING diff --git a/src/instr/interface.c b/src/instr/interface.c index 78092e67bf..9397e1f463 100644 --- a/src/instr/interface.c +++ b/src/instr/interface.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #ifdef HAVE_TRACING diff --git a/src/instr/msg_process_instr.c b/src/instr/msg_process_instr.c index e1b71e109d..03da8b2b69 100644 --- a/src/instr/msg_process_instr.c +++ b/src/instr/msg_process_instr.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #ifdef HAVE_TRACING diff --git a/src/instr/msg_task_instr.c b/src/instr/msg_task_instr.c index 41583bb456..75b8a91989 100644 --- a/src/instr/msg_task_instr.c +++ b/src/instr/msg_task_instr.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #ifdef HAVE_TRACING diff --git a/src/instr/paje.c b/src/instr/paje.c index ee2f22cc01..06ac5a3e82 100644 --- a/src/instr/paje.c +++ b/src/instr/paje.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #ifdef HAVE_TRACING diff --git a/src/instr/private.h b/src/instr/private.h index 09bc980ceb..f79dca7965 100644 --- a/src/instr/private.h +++ b/src/instr/private.h @@ -13,7 +13,7 @@ #ifndef INSTR_PRIVATE_H_ #define INSTR_PRIVATE_H_ -#include "instr/config.h" +#include "instr/tracing_config.h" #ifdef HAVE_TRACING diff --git a/src/instr/smx_instr.c b/src/instr/smx_instr.c index 675ec54c18..6c996d57e2 100644 --- a/src/instr/smx_instr.c +++ b/src/instr/smx_instr.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #ifdef HAVE_TRACING diff --git a/src/instr/surf_instr.c b/src/instr/surf_instr.c index 81a2be7c3c..d1e9b310ef 100644 --- a/src/instr/surf_instr.c +++ b/src/instr/surf_instr.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #ifdef HAVE_TRACING diff --git a/src/instr/variables_instr.c b/src/instr/variables_instr.c index bd1c38adc9..7b6be993fe 100644 --- a/src/instr/variables_instr.c +++ b/src/instr/variables_instr.c @@ -11,7 +11,6 @@ */ #include "instr/private.h" -#include "instr/config.h" #include "surf/surf_private.h" #include "surf/network_private.h" diff --git a/src/simix/private.h b/src/simix/private.h index 4568983ed6..feea909442 100644 --- a/src/simix/private.h +++ b/src/simix/private.h @@ -18,7 +18,6 @@ #include "xbt/function_types.h" #include "xbt/ex_interface.h" #include "instr/private.h" -#include "instr/config.h" /******************************** Datatypes ***********************************/