Skip to content

Commit

Permalink
Don't include os.cc in the module if it is disabled via FMT_OS
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jan 2, 2024
1 parent 068bf9b commit 9659f22
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/fmt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@ 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"
#include "fmt/chrono.h"
#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"
Expand All @@ -107,4 +111,6 @@ module :private;
#endif

#include "format.cc"
#include "os.cc"
#if FMT_OS
# include "os.cc"
#endif

0 comments on commit 9659f22

Please sign in to comment.