Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
proper use of the HAVE_TRACING variable defined by Cmake through -Dtracing=on
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 1 Apr 2010 14:17:02 +0000 (14:17 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 1 Apr 2010 14:17:02 +0000 (14:17 +0000)
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

17 files changed:
.gitignore
buildtools/Cmake/src/CMakeCompleteInFiles.txt
buildtools/Cmake/src/tracing_config.h.in [new file with mode: 0644]
include/instr/config.h [deleted file]
include/instr/config.h.in [deleted file]
include/instr/instr.h
include/msg/datatypes.h
src/instr/general.c
src/instr/interface.c
src/instr/msg_process_instr.c
src/instr/msg_task_instr.c
src/instr/paje.c
src/instr/private.h
src/instr/smx_instr.c
src/instr/surf_instr.c
src/instr/variables_instr.c
src/simix/private.h

index 2bb0937..a12ebed 100644 (file)
@@ -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
index 95dd392..0a6b5df 100644 (file)
@@ -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 (file)
index 0000000..1aa5f02
--- /dev/null
@@ -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 (file)
index 759579e..0000000
+++ /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 (file)
index f2f159d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* defines whether instrumentation must be compiled or not */
-#undef HAVE_TRACING
index 17715d2..8b87e2f 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef INSTR_H_
 #define INSTR_H_
 
-#include "instr/config.h"
+#include "instr/tracing_config.h"
 
 #ifdef HAVE_TRACING
 
index 0446f96..255b155 100644 (file)
@@ -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()
 
index d7f002b..3e0dc11 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 
 
 #ifdef HAVE_TRACING
index 78092e6..9397e1f 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 
 
 #ifdef HAVE_TRACING
index e1b71e1..03da8b2 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 
 #ifdef HAVE_TRACING
 
index 41583bb..75b8a91 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 
 #ifdef HAVE_TRACING
 
index ee2f22c..06ac5a3 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 
 #ifdef HAVE_TRACING
 
index 09bc980..f79dca7 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef INSTR_PRIVATE_H_
 #define INSTR_PRIVATE_H_
 
-#include "instr/config.h"
+#include "instr/tracing_config.h"
 
 #ifdef HAVE_TRACING
 
index 675ec54..6c996d5 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 
 #ifdef HAVE_TRACING
 
index 81a2be7..d1e9b31 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 
 #ifdef HAVE_TRACING
 
index bd1c38a..7b6be99 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include "instr/private.h"
-#include "instr/config.h"
 #include "surf/surf_private.h"
 #include "surf/network_private.h"
 
index 4568983..feea909 100644 (file)
@@ -18,7 +18,6 @@
 #include "xbt/function_types.h"
 #include "xbt/ex_interface.h"
 #include "instr/private.h"
-#include "instr/config.h"
 
 /******************************** Datatypes ***********************************/