diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-24 11:14:10 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-24 11:14:10 +0200 |
commit | 3bd426dce9d6c9e37dc08e9591a2caa6fa1fdb20 (patch) | |
tree | 9fc84320c4b777a52512c317b591c90708f13a7a /libbutl/export.hxx | |
parent | e652a49cbac1098dd97695309336545ef4e9ae89 (diff) |
Add build system support for modularization
Diffstat (limited to 'libbutl/export.hxx')
-rw-r--r-- | libbutl/export.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libbutl/export.hxx b/libbutl/export.hxx index 3c2d2a9..5c59539 100644 --- a/libbutl/export.hxx +++ b/libbutl/export.hxx @@ -5,6 +5,14 @@ #ifndef LIBBUTL_EXPORT_HXX #define LIBBUTL_EXPORT_HXX +// If we are compiling a module interface, setup the module export. +// +#ifdef LIBBUTL_MODULE_BUILD +# define LIBBUTL_MODEXPORT export +#else +# define LIBBUTL_MODEXPORT +#endif + // Normally we don't export class templates (but do complete specializations), // inline functions, and classes with only inline member functions. Exporting // classes that inherit from non-exported/imported bases (e.g., std::string) @@ -35,7 +43,7 @@ // type. Note that this fallback works for both static and shared but in case // of shared will be sub-optimal compared to having dllimport. // -# define LIBBUTL_SYMEXPORT // Using static or shared. +# define LIBBUTL_SYMEXPORT // Using static or shared. #endif #endif // LIBBUTL_EXPORT_HXX |