diff --git a/src/fmt.cc b/src/fmt.cc new file mode 100644 index 00000000..f0dc5721 --- /dev/null +++ b/src/fmt.cc @@ -0,0 +1,87 @@ +module; +// put all implementation-provided headers into the global module fragment +// to prevent attachment to this module +#if !defined(_CRT_SECURE_NO_WARNINGS) && defined(_MSC_VER) +# define _CRT_SECURE_NO_WARNINGS +#endif +#if !defined(WIN32_LEAN_AND_MEAN) && defined(_WIN32) +# define WIN32_LEAN_AND_MEAN +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if _MSC_VER +# include +#endif +#if defined __APPLE__ || defined(__FreeBSD__) +# include +#endif +#if __has_include() +# include +#endif +#if (__has_include() || defined(__APPLE__) || \ + defined(__linux__)) && \ + (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) +# include +# include +# include +# ifndef _WIN32 +# include +# else +# include +# endif +#endif +#ifdef _WIN32 +# include +#endif + +export module fmt; + +#define FMT_MODULE_EXPORT export +#define FMT_MODULE_EXPORT_BEGIN export { +#define FMT_MODULE_EXPORT_END } + +// all library-provided declarations and definitions +// must be in the module purview to be exported +#include "fmt/format.h" +#include "fmt/args.h" +#include "fmt/color.h" +#include "fmt/compile.h" +#include "fmt/locale.h" +#include "fmt/chrono.h" +#include "fmt/printf.h" +#include "fmt/os.h" + +module : private; + +#include "format.cc" +#include "os.cc"