aboutsummaryrefslogtreecommitdiff
path: root/src/id.cc
diff options
context:
space:
mode:
authorschnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f>2008-02-03 15:07:15 +0000
committerschnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f>2008-02-03 15:07:15 +0000
commit319ca8698a6df7696a8d0423d4335712d1a9b0b8 (patch)
treeb5abb84c7e4820cf1b939fc760588e58aa99b361 /src/id.cc
parent304b1ed1b992ca817dfcd57091c9d9623bb17ea7 (diff)
Use git, if available, to store the complete source code tree at build
time. Remember and output the git commit id at run time. git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@148 83718e91-0e4f-0410-abf4-91180603181f
Diffstat (limited to 'src/id.cc')
-rw-r--r--src/id.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/id.cc b/src/id.cc
index 77567cf..b9cc45b 100644
--- a/src/id.cc
+++ b/src/id.cc
@@ -42,12 +42,24 @@ namespace Formaline
+ // Unique source ID
+ extern "C" char const source_id[];
+
// Unique build ID
extern "C" char const build_id[];
- // Get a unique build id
+ // Get the unique source id
+ char const *
+ get_source_id (cGH const * const cctkGH)
+ {
+ return source_id;
+ }
+
+
+
+ // Get the unique build id
char const *
get_build_id (cGH const * const cctkGH)
{
@@ -202,6 +214,7 @@ namespace Formaline
extern "C" int
Formaline_PrintIDs ()
{
+ CCTK_VInfo (CCTK_THORNSTRING, "Source id: %s", get_source_id (0));
CCTK_VInfo (CCTK_THORNSTRING, "Build id: %s", get_build_id (0));
CCTK_VInfo (CCTK_THORNSTRING, "Simulation id: %s", get_simulation_id (0));
CCTK_VInfo (CCTK_THORNSTRING, "Run id: %s", get_run_id (0));