summaryrefslogtreecommitdiff
path: root/src/util/configuration.cpp
blob: 12908c672603a7c7f8ed1f6ef61c98a0b4cda103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*********************                                                        */
/*! \file configuration.cpp
 ** \verbatim
 ** Original author: mdeters
 ** Major contributors: none
 ** Minor contributors (to current version): none
 ** This file is part of the CVC4 prototype.
 ** Copyright (c) 2009, 2010  The Analysis of Computer Systems Group (ACSys)
 ** Courant Institute of Mathematical Sciences
 ** New York University
 ** See the file COPYING in the top-level source directory for licensing
 ** information.\endverbatim
 **
 ** \brief Implementation of Configuration class, which provides compile-time
 ** configuration information about the CVC4 library.
 **
 ** Implementation of Configuration class, which provides compile-time
 ** configuration information about the CVC4 library.
 **/

#include "util/configuration.h"
#include "cvc4autoconfig.h"

using namespace std;

namespace CVC4 {

bool Configuration::isDebugBuild() {
#ifdef CVC4_DEBUG
  return true;
#else /* CVC4_DEBUG */
  return false;
#endif /* CVC4_DEBUG */
}

bool Configuration::isTracingBuild() {
#ifdef CVC4_TRACING
  return true;
#else /* CVC4_TRACING */
  return false;
#endif /* CVC4_TRACING */
}

bool Configuration::isMuzzledBuild() {
#ifdef CVC4_MUZZLE
  return true;
#else /* CVC4_MUZZLE */
  return false;
#endif /* CVC4_MUZZLE */
}

bool Configuration::isAssertionBuild() {
#ifdef CVC4_ASSERTIONS
  return true;
#else /* CVC4_ASSERTIONS */
  return false;
#endif /* CVC4_ASSERTIONS */
}

bool Configuration::isCoverageBuild() {
#ifdef CVC4_COVERAGE
  return true;
#else /* CVC4_COVERAGE */
  return false;
#endif /* CVC4_COVERAGE */
}

bool Configuration::isProfilingBuild() {
#ifdef CVC4_PROFILING
  return true;
#else /* CVC4_PROFILING */
  return false;
#endif /* CVC4_PROFILING */
}

string Configuration::getPackageName() {
  return PACKAGE_NAME;
}

string Configuration::getVersionString() {
  return CVC4_RELEASE_STRING;
}

unsigned Configuration::getVersionMajor() {
  return CVC4_MAJOR;
}

unsigned Configuration::getVersionMinor() {
  return CVC4_MINOR;
}

unsigned Configuration::getVersionRelease() {
  return CVC4_RELEASE;
}

string Configuration::about() {
  return string("\
This is a pre-release of CVC4.\n\
Copyright (C) 2009, 2010\n\
  The ACSys Group\n\
  Courant Institute of Mathematical Sciences\n\
  New York University\n\
  New York, NY  10012  USA\n\n") +
    (isBuiltWithCln() ? "\
This CVC4 library uses CLN as its multi-precision arithmetic library.\n\n\
CVC4 is open-source and is covered by the BSD license (modified).\n\
However, CLN, the Class Library for Numbers, is covered by the GPL.  Thus\n\
this CVC4 library cannot be used in proprietary applications.  Please\n\
consult the CVC4 documentation for instructions about building a version\n\
of CVC4 that links against GMP, and can be used in such applications.\n" :
"This CVC4 library uses GMP as its multi-precision arithmetic library.\n\n\
CVC4 is open-source and is covered by the BSD license (modified).\n");
}

bool Configuration::isBuiltWithGmp() {
#ifdef CVC4_GMP_IMP
  return true;
#else /* CVC4_GMP_IMP */
  return false;
#endif /* CVC4_GMP_IMP */
}

bool Configuration::isBuiltWithCln() {
#ifdef CVC4_CLN_IMP
  return true;
#else /* CVC4_CLN_IMP */
  return false;
#endif /* CVC4_CLN_IMP */
}

}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback