ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cadical_version.cpp
Go to the documentation of this file.
1#include "global.h"
2
3/*------------------------------------------------------------------------*/
4
5// To simplify the build process without 'make', you can disable the
6// generation of 'build.hpp' through '../scripts/make-build-header.sh' by
7// defining '-DCADICAL_NBUILD'. Then we try to guess part of the configuration.
8
9#ifndef CADICAL_NBUILD
10#if __GNUC__ > 4
11#if __has_include(<build.hpp>)
12#include "build.hpp"
13#endif // __has_include
14#else
15#include "build.hpp"
16#endif // __GNUC > 4
17#endif // CADICAL_NBUILD
18
19/*------------------------------------------------------------------------*/
20
21// We prefer short 3 character version numbers made of digits and lower case
22// letters only, which gives 36^3 = 46656 different versions. The following
23// macro is used for the non-standard build process and only set from
24// the file '../VERSION' with '../scripts/update-version.sh'. The standard
25// build process relies on 'VERSION' to be defined in 'build.hpp'.
26
27#ifdef CADICAL_NBUILD
28#ifndef VERSION
29#define VERSION "2.2.0-rc1"
30#endif // VERSION
31#endif // CADICAL_NBUILD
32
33 /*------------------------------------------------------------------------*/
34
35 // The copyright of the code is here.
36
37 static const char *COPYRIGHT = "Copyright (c) 2016-2024";
38static const char *AUTHORS =
39 "A. Biere, M. Fleury, N. Froleyks, K. Fazekas, F. Pollitt, T. Faller";
40static const char *AFFILIATIONS =
41 "JKU Linz, University of Freiburg, TU Wien";
42
43/*------------------------------------------------------------------------*/
44
45// Again if we do not have 'CADICAL_NBUILD' or if something during configuration is
46// broken we still want to be able to compile the solver. In this case we
47// then try our best to figure out 'COMPILER' and 'DATE', but for
48// 'IDENTIFIER' and 'FLAGS' we can only use the '0' string, which marks
49// those as unknown.
50
51#ifndef COMPILER
52#ifdef __clang__
53#ifdef __VERSION__
54#define COMPILER "clang++-" __VERSION__
55#else
56#define COMPILER "clang++"
57#endif
58#elif defined(__GNUC__)
59#ifdef __VERSION__
60#define COMPILER "g++-" __VERSION__
61#else
62#define COMPILER "g++"
63#endif
64#else
65#define COMPILER 0
66#endif
67#endif
68
69// GIT SHA2 identifier.
70//
71#ifndef IDENTIFIER
72#define IDENTIFIER 0
73#endif
74#ifdef SHORTID
75#define SHORTIDSTR "-" SHORTID
76#else
77#define SHORTIDSTR ""
78#define SHORTID 0
79#endif
80
81// Compilation flags.
82//
83#ifndef FLAGS
84#define FLAGS 0
85#endif
86
87// Build Time and operating system.
88//
89#ifndef DATE
90#define DATE __DATE__ " " __TIME__
91#endif
92
93/*------------------------------------------------------------------------*/
94
95#include "version.hpp"
96
98
99namespace CaDiCaL {
100
101const char *version () { return VERSION; }
102const char *copyright () { return COPYRIGHT; }
103const char *authors () { return AUTHORS; }
104const char *affiliations () { return AFFILIATIONS; }
105const char *signature () { return "cadical-" VERSION SHORTIDSTR; }
106const char *identifier () { return IDENTIFIER; }
107const char *compiler () { return COMPILER; }
108const char *date () { return DATE; }
109const char *flags () { return FLAGS; }
110
111} // namespace CaDiCaL
112
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define SHORTIDSTR
#define DATE
#define IDENTIFIER
#define COMPILER
#define FLAGS
#define VERSION
Definition espresso.h:367
const char * authors()
const char * version()
const char * signature()
const char * date()
const char * identifier()
const char * flags()
const char * affiliations()
const char * copyright()
const char * compiler()