Skip to content

Commit 6694d4e

Browse files
committed
Print git revision with all --version outputs
1 parent 6edd2b3 commit 6694d4e

18 files changed

+18
-27
lines changed

src/cbmc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ CLEANFILES = cbmc$(EXEEXT)
4242

4343
all: cbmc$(EXEEXT)
4444

45+
CP_CXXFLAGS += -DCBMC_VERSION="\"$(CBMC_VERSION) ($(RELEASE_INFO))\""
46+
4547
ifneq ($(wildcard ../bv_refinement/Makefile),)
4648
OBJ += ../bv_refinement/bv_refinement$(LIBEXT)
4749
CP_CXXFLAGS += -DHAVE_BV_REFINEMENT

src/cbmc/cbmc_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ Author: Daniel Kroening, [email protected]
5555
#include "cbmc_solvers.h"
5656
#include "cbmc_parse_options.h"
5757
#include "bmc.h"
58-
#include "version.h"
5958
#include "xml_interface.h"
6059

6160
/*******************************************************************\

src/cbmc/cbmc_solvers.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Author: Daniel Kroening, [email protected]
2424
#include "bv_cbmc.h"
2525
#include "cbmc_dimacs.h"
2626
#include "counterexample_beautification.h"
27-
#include "version.h"
2827

2928
/*******************************************************************\
3029

src/cbmc/version.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/config.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ MINISAT2 = ../../minisat-2.2.1
2828
# Signing identity for MacOS Gatekeeper
2929

3030
OSX_IDENTITY="Developer ID Application: Daniel Kroening"
31+
32+
# Detailed version information
33+
CBMC_VERSION = 5.7
34+
GIT_HEAD = $(shell git rev-parse --short HEAD || echo "n/a")
35+
GIT_MOD = $(shell git diff HEAD --quiet || echo +dirty)
36+
RELEASE_INFO = $(GIT_HEAD)$(GIT_MOD)

src/goto-analyzer/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ CLEANFILES = goto-analyzer$(EXEEXT)
2626

2727
all: goto-analyzer$(EXEEXT)
2828

29+
CP_CXXFLAGS += -DCBMC_VERSION="\"$(CBMC_VERSION) ($(RELEASE_INFO))\""
30+
2931
ifneq ($(wildcard ../java_bytecode/Makefile),)
3032
OBJ += ../java_bytecode/java_bytecode$(LIBEXT)
3133
CP_CXXFLAGS += -DHAVE_JAVA_BYTECODE

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Author: Daniel Kroening, [email protected]
4242
#include <util/string2int.h>
4343
#include <util/unicode.h>
4444

45-
#include <cbmc/version.h>
46-
4745
#include "goto_analyzer_parse_options.h"
4846
#include "taint_analysis.h"
4947
#include "unreachable_instructions.h"

src/goto-cc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ all: goto-cl$(EXEEXT)
3131
endif
3232
all: goto-cc$(EXEEXT)
3333

34+
CP_CXXFLAGS += -DCBMC_VERSION="\"$(CBMC_VERSION) ($(RELEASE_INFO))\""
35+
3436
ifneq ($(wildcard ../java_bytecode/Makefile),)
3537
OBJ += ../java_bytecode/java_bytecode$(LIBEXT)
3638
endif

src/goto-cc/compile.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ Date: June 2006
3535

3636
#include <langapi/mode.h>
3737

38-
#include <cbmc/version.h>
39-
4038
#include "compile.h"
4139

4240
#define DOTGRAPHSETTINGS "color=black;" \

src/goto-cc/gcc_mode.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Author: CM Wintersteiger, 2006
2626
#include <util/get_base_name.h>
2727
#include <util/run.h>
2828

29-
#include <cbmc/version.h>
30-
3129
#include "compile.h"
3230
#include "gcc_mode.h"
3331

src/goto-cc/goto_cc_mode.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Author: CM Wintersteiger, 2006
1717
#include <sysexits.h>
1818
#endif
1919

20-
#include <cbmc/version.h>
2120

2221
#include "goto_cc_mode.h"
2322

src/goto-cc/ms_cl_mode.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Author: CM Wintersteiger, 2006
2222
#include <util/config.h>
2323
#include <util/get_base_name.h>
2424

25-
#include <cbmc/version.h>
26-
2725
#include "ms_cl_mode.h"
2826
#include "compile.h"
2927

src/goto-diff/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ CLEANFILES = goto-diff$(EXEEXT)
2828

2929
all: goto-diff$(EXEEXT)
3030

31+
CP_CXXFLAGS += -DCBMC_VERSION="\"$(CBMC_VERSION) ($(RELEASE_INFO))\""
32+
3133
ifneq ($(wildcard ../java_bytecode/Makefile),)
3234
OBJ += ../java_bytecode/java_bytecode$(LIBEXT)
3335
CP_CXXFLAGS += -DHAVE_JAVA_BYTECODE

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ Author: Peter Schrammel
3636

3737
#include <langapi/mode.h>
3838

39-
#include <cbmc/version.h>
40-
4139
#include "goto_diff_parse_options.h"
4240
#include "goto_diff.h"
4341
#include "syntactic_diff.h"

src/goto-instrument/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ include ../common
5252

5353
all: goto-instrument$(EXEEXT)
5454

55+
CP_CXXFLAGS += -DCBMC_VERSION="\"$(CBMC_VERSION) ($(RELEASE_INFO))\""
56+
5557
ifneq ($(wildcard ../java_bytecode/Makefile),)
5658
OBJ += ../java_bytecode/java_bytecode$(LIBEXT)
5759
CP_CXXFLAGS += -DHAVE_JAVA_BYTECODE

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ Author: Daniel Kroening, [email protected]
5555
#include <analyses/constant_propagator.h>
5656
#include <analyses/is_threaded.h>
5757

58-
#include <cbmc/version.h>
59-
6058
#include "goto_instrument_parse_options.h"
6159
#include "document_properties.h"
6260
#include "uninitialized.h"

src/musketeer/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ include ../common
3737

3838
all: musketeer$(EXEEXT)
3939

40+
CP_CXXFLAGS += -DGOTO_FENCE_INSERTER_VERSION="\"0.37 ($(RELEASE_INFO))\""
41+
4042
ifneq ($(LIB_GLPK),)
4143
LIBS += $(LIB_GLPK)
4244
CP_CXXFLAGS += -DHAVE_GLPK

src/musketeer/version.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)