summaryrefslogtreecommitdiff
path: root/src/options/option_exception.h
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2021-03-16 10:56:01 -0700
committerGitHub <noreply@github.com>2021-03-16 10:56:01 -0700
commitd6890791897ddebf1212d3e3147bf7aeb2415b27 (patch)
tree51c69ba48a7550b6a7660e2488b4b39cbedba539 /src/options/option_exception.h
parent0d3ea6f2dcaf80d386c7765ee8a708c18e3ed574 (diff)
cmake: Generate cvc4_export.h and set visibility to hidden. (#6139)
The build system (cmake) will automatically generate an export header cvc4_export.h, which makes sure that the correct export features are defined depending on the compiler and target platform. The macro CVC4_EXPORT replaces CVC4_PUBLIC and its usage is reduced by 2/3. Co-authored-by: Gereon Kremer <nafur42@gmail.com>
Diffstat (limited to 'src/options/option_exception.h')
-rw-r--r--src/options/option_exception.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/options/option_exception.h b/src/options/option_exception.h
index 84bde3ce5..11d6b8fd3 100644
--- a/src/options/option_exception.h
+++ b/src/options/option_exception.h
@@ -20,6 +20,7 @@
#define CVC4__OPTION_EXCEPTION_H
#include "base/exception.h"
+#include "cvc4_export.h"
namespace CVC4 {
@@ -29,7 +30,8 @@ namespace CVC4 {
* name is itself unrecognized, a UnrecognizedOptionException (a derived
* class, below) should be used instead.
*/
-class CVC4_PUBLIC OptionException : public CVC4::Exception {
+class CVC4_EXPORT OptionException : public CVC4::Exception
+{
public:
OptionException(const std::string& s) : CVC4::Exception(s_errPrefix + s) {}
@@ -45,13 +47,14 @@ class CVC4_PUBLIC OptionException : public CVC4::Exception {
private:
/** The string to be added in front of the actual error message */
static const std::string s_errPrefix;
-};/* class OptionException */
+}; /* class OptionException */
/**
* Class representing an exception in option processing due to an
* unrecognized or unsupported option key.
*/
-class CVC4_PUBLIC UnrecognizedOptionException : public CVC4::OptionException {
+class UnrecognizedOptionException : public CVC4::OptionException
+{
public:
UnrecognizedOptionException() :
CVC4::OptionException("Unrecognized informational or option key or setting") {
@@ -60,7 +63,7 @@ class CVC4_PUBLIC UnrecognizedOptionException : public CVC4::OptionException {
UnrecognizedOptionException(const std::string& msg) :
CVC4::OptionException("Unrecognized informational or option key or setting: " + msg) {
}
-};/* class UnrecognizedOptionException */
+}; /* class UnrecognizedOptionException */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback