mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-27 03:30:32 +00:00
Fix missing includes in fmt.cc (#3994)
This causes duplicated std definitions in the fmt module
This commit is contained in:
parent
a3d95971be
commit
0f6e716548
@ -63,6 +63,8 @@ function(add_module_library name)
|
|||||||
target_compile_options(${name} PUBLIC -fmodules-ts)
|
target_compile_options(${name} PUBLIC -fmodules-ts)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
target_compile_definitions(${name} PRIVATE FMT_MODULE)
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.28 AND CMAKE_GENERATOR STREQUAL "Ninja")
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.28 AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||||
target_sources(${name} PUBLIC FILE_SET fmt TYPE CXX_MODULES FILES ${sources})
|
target_sources(${name} PUBLIC FILE_SET fmt TYPE CXX_MODULES FILES ${sources})
|
||||||
else()
|
else()
|
||||||
|
@ -8,9 +8,12 @@
|
|||||||
#ifndef FMT_BASE_H_
|
#ifndef FMT_BASE_H_
|
||||||
#define FMT_BASE_H_
|
#define FMT_BASE_H_
|
||||||
|
|
||||||
#include <limits.h> // CHAR_BIT
|
// c headers are preferable for performance reasons
|
||||||
#include <stdio.h> // FILE
|
#ifndef FMT_MODULE
|
||||||
#include <string.h> // strlen
|
# include <limits.h> // CHAR_BIT
|
||||||
|
# include <stdio.h> // FILE
|
||||||
|
# include <string.h> // strlen
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef FMT_IMPORT_STD
|
#ifndef FMT_IMPORT_STD
|
||||||
// <cstddef> is also included transitively from <type_traits>.
|
// <cstddef> is also included transitively from <type_traits>.
|
||||||
|
@ -2144,8 +2144,7 @@ struct formatter<day, Char> : private formatter<std::tm, Char> {
|
|||||||
if (use_tm_formatter_) return formatter<std::tm, Char>::format(time, ctx);
|
if (use_tm_formatter_) return formatter<std::tm, Char>::format(time, ctx);
|
||||||
detail::get_locale loc(false, ctx.locale());
|
detail::get_locale loc(false, ctx.locale());
|
||||||
auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
|
auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
|
||||||
w.on_day_of_month(detail::numeric_system::standard,
|
w.on_day_of_month(detail::numeric_system::standard, detail::pad_type::zero);
|
||||||
detail::pad_type::zero);
|
|
||||||
return w.out();
|
return w.out();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -6,6 +6,7 @@ module;
|
|||||||
# include <algorithm>
|
# include <algorithm>
|
||||||
# include <chrono>
|
# include <chrono>
|
||||||
# include <cmath>
|
# include <cmath>
|
||||||
|
# include <complex>
|
||||||
# include <cstddef>
|
# include <cstddef>
|
||||||
# include <cstdint>
|
# include <cstdint>
|
||||||
# include <cstdio>
|
# include <cstdio>
|
||||||
@ -13,6 +14,7 @@ module;
|
|||||||
# include <cstring>
|
# include <cstring>
|
||||||
# include <ctime>
|
# include <ctime>
|
||||||
# include <exception>
|
# include <exception>
|
||||||
|
# include <expected>
|
||||||
# include <filesystem>
|
# include <filesystem>
|
||||||
# include <fstream>
|
# include <fstream>
|
||||||
# include <functional>
|
# include <functional>
|
||||||
@ -22,6 +24,7 @@ module;
|
|||||||
# include <memory>
|
# include <memory>
|
||||||
# include <optional>
|
# include <optional>
|
||||||
# include <ostream>
|
# include <ostream>
|
||||||
|
# include <source_location>
|
||||||
# include <stdexcept>
|
# include <stdexcept>
|
||||||
# include <string>
|
# include <string>
|
||||||
# include <string_view>
|
# include <string_view>
|
||||||
@ -104,7 +107,9 @@ extern "C++" {
|
|||||||
#if FMT_OS
|
#if FMT_OS
|
||||||
# include "fmt/os.h"
|
# include "fmt/os.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "fmt/ostream.h"
|
||||||
#include "fmt/printf.h"
|
#include "fmt/printf.h"
|
||||||
|
#include "fmt/ranges.h"
|
||||||
#include "fmt/std.h"
|
#include "fmt/std.h"
|
||||||
#include "fmt/xchar.h"
|
#include "fmt/xchar.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user