Don't include os.cc in the module if it is disabled via FMT_OS

This commit is contained in:
Victor Zverovich
2024-01-01 18:32:53 -08:00
parent 068bf9bad8
commit 9659f22d36

View File

@ -83,6 +83,10 @@ export module fmt;
extern "C++" {
#endif
#ifndef FMT_OS
# define FMT_OS 1
#endif
// All library-provided declarations and definitions must be in the module
// purview to be exported.
#include "fmt/args.h"
@ -90,8 +94,8 @@ extern "C++" {
#include "fmt/color.h"
#include "fmt/compile.h"
#include "fmt/format.h"
#if !defined(FMT_OS) || FMT_OS
# include "fmt/os.h"
#if FMT_OS
# include "fmt/os.h"
#endif
#include "fmt/printf.h"
#include "fmt/std.h"
@ -107,4 +111,6 @@ module :private;
#endif
#include "format.cc"
#include "os.cc"
#if FMT_OS
# include "os.cc"
#endif