From 3bd426dce9d6c9e37dc08e9591a2caa6fa1fdb20 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 24 Jun 2017 11:14:10 +0200 Subject: Add build system support for modularization --- libbutl/export.hxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libbutl/export.hxx') 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 -- cgit v1.1