summaryrefslogtreecommitdiff
path: root/src/options/mkoptions.py
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/mkoptions.py
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/mkoptions.py')
-rw-r--r--src/options/mkoptions.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/options/mkoptions.py b/src/options/mkoptions.py
index f13cf3fc6..4dc8880b1 100644
--- a/src/options/mkoptions.py
+++ b/src/options/mkoptions.py
@@ -168,23 +168,23 @@ TPL_HOLDER_MACRO_ATTR += " bool {name}__setByUser__;"
TPL_OPTION_STRUCT_RW = \
-"""extern struct CVC4_PUBLIC {name}__option_t
+"""extern struct {name}__option_t
{{
typedef {type} type;
type operator()() const;
bool wasSetByUser() const;
void set(const type& v);
const char* getName() const;
-}} thread_local {name} CVC4_PUBLIC;"""
+}} thread_local {name};"""
TPL_OPTION_STRUCT_RO = \
-"""extern struct CVC4_PUBLIC {name}__option_t
+"""extern struct {name}__option_t
{{
typedef {type} type;
type operator()() const;
bool wasSetByUser() const;
const char* getName() const;
-}} thread_local {name} CVC4_PUBLIC;"""
+}} thread_local {name};"""
TPL_DECL_SET = \
@@ -258,9 +258,9 @@ enum class {type}
TPL_DECL_MODE_FUNC = \
"""
std::ostream&
-operator<<(std::ostream& os, {type} mode) CVC4_PUBLIC;"""
+operator<<(std::ostream& os, {type} mode);"""
-TPL_IMPL_MODE_FUNC = TPL_DECL_MODE_FUNC[:-len(" CVC4_PUBLIC;")] + \
+TPL_IMPL_MODE_FUNC = TPL_DECL_MODE_FUNC[:-len(";")] + \
"""
{{
os << "{type}::";
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback