Skip to content

Commit 877e252

Browse files
committed
Update fmt to v11.1.1
1 parent 46b6862 commit 877e252

File tree

5 files changed

+43
-27
lines changed

5 files changed

+43
-27
lines changed

3rdparty/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
## {fmt}
6969
- [![Upstream](https://img.shields.io/github/v/release/fmtlib/fmt?label=Upstream)](https://github.com/fmtlib/fmt)
70-
- Version: 11.1.0
70+
- Version: 11.1.1
7171

7272
- License: MIT
7373

3rdparty/fmt/CMakeLists.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ if (FMT_INSTALL)
426426
endif()
427427

428428
# Install the library and headers.
429-
install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}
429+
install(TARGETS ${INSTALL_TARGETS}
430+
COMPONENT core
431+
EXPORT ${targets_export_name}
430432
LIBRARY DESTINATION ${FMT_LIB_DIR}
431433
ARCHIVE DESTINATION ${FMT_LIB_DIR}
432434
PUBLIC_HEADER DESTINATION "${FMT_INC_DIR}/fmt"
@@ -439,13 +441,15 @@ if (FMT_INSTALL)
439441
FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
440442

441443
# Install version, config and target files.
442-
install(
443-
FILES ${project_config} ${version_config}
444-
DESTINATION ${FMT_CMAKE_DIR})
444+
install(FILES ${project_config} ${version_config}
445+
DESTINATION ${FMT_CMAKE_DIR}
446+
COMPONENT core)
445447
install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}
446-
NAMESPACE fmt::)
448+
NAMESPACE fmt::
449+
COMPONENT core)
447450

448-
install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")
451+
install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}"
452+
COMPONENT core)
449453
endif ()
450454

451455
function(add_doc_target)
@@ -481,7 +485,8 @@ function(add_doc_target)
481485

482486
include(GNUInstallDirs)
483487
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc-html/
484-
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/fmt OPTIONAL)
488+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/fmt
489+
COMPONENT doc OPTIONAL)
485490
endfunction()
486491

487492
if (FMT_DOC)

3rdparty/fmt/ChangeLog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# 11.1.1 - 2024-12-27
2+
3+
- Fixed ABI compatibility with earlier 11.x versions
4+
(https://github.com/fmtlib/fmt/issues/4278).
5+
6+
- Defined CMake components (`core` and `doc`) to allow docs to be installed
7+
separately (https://github.com/fmtlib/fmt/pull/4276).
8+
Thanks @carlsmedstad.
9+
110
# 11.1.0 - 2024-12-25
211

312
- Improved C++20 module support

3rdparty/fmt/include/fmt/base.h

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#endif
2222

2323
// The fmt library version in the form major * 10000 + minor * 100 + patch.
24-
#define FMT_VERSION 110100
24+
#define FMT_VERSION 110101
2525

2626
// Detect compiler versions.
2727
#if defined(__clang__) && !defined(__ibmxl__)
@@ -161,6 +161,20 @@
161161
# define FMT_CATCH(x) if (false)
162162
#endif
163163

164+
#ifdef FMT_NO_UNIQUE_ADDRESS
165+
// Use the provided definition.
166+
#elif FMT_CPLUSPLUS < 202002L
167+
// Not supported.
168+
#elif FMT_HAS_CPP_ATTRIBUTE(no_unique_address)
169+
# define FMT_NO_UNIQUE_ADDRESS [[no_unique_address]]
170+
// VS2019 v16.10 and later except clang-cl (https://reviews.llvm.org/D110485).
171+
#elif FMT_MSC_VERSION >= 1929 && !FMT_CLANG_VERSION
172+
# define FMT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
173+
#endif
174+
#ifndef FMT_NO_UNIQUE_ADDRESS
175+
# define FMT_NO_UNIQUE_ADDRESS
176+
#endif
177+
164178
#if FMT_HAS_CPP17_ATTRIBUTE(fallthrough)
165179
# define FMT_FALLTHROUGH [[fallthrough]]
166180
#elif defined(__clang__)
@@ -2604,10 +2618,11 @@ template <typename Context> class basic_format_args {
26042618
};
26052619

26062620
// A formatting context.
2607-
class context : private detail::locale_ref {
2621+
class context {
26082622
private:
26092623
appender out_;
26102624
format_args args_;
2625+
FMT_NO_UNIQUE_ADDRESS detail::locale_ref loc_;
26112626

26122627
public:
26132628
/// The character type for the output.
@@ -2623,7 +2638,7 @@ class context : private detail::locale_ref {
26232638
/// in the object so make sure they have appropriate lifetimes.
26242639
FMT_CONSTEXPR context(iterator out, format_args args,
26252640
detail::locale_ref loc = {})
2626-
: locale_ref(loc), out_(out), args_(args) {}
2641+
: out_(out), args_(args), loc_(loc) {}
26272642
context(context&&) = default;
26282643
context(const context&) = delete;
26292644
void operator=(const context&) = delete;
@@ -2642,7 +2657,7 @@ class context : private detail::locale_ref {
26422657
// Advances the begin iterator to `it`.
26432658
FMT_CONSTEXPR void advance_to(iterator) {}
26442659

2645-
FMT_CONSTEXPR auto locale() const -> detail::locale_ref { return *this; }
2660+
FMT_CONSTEXPR auto locale() const -> detail::locale_ref { return loc_; }
26462661
};
26472662

26482663
template <typename Char = char> struct runtime_format_string {
@@ -2659,7 +2674,8 @@ template <typename Char = char> struct runtime_format_string {
26592674
*/
26602675
inline auto runtime(string_view s) -> runtime_format_string<> { return {{s}}; }
26612676

2662-
/// A compile-time format string.
2677+
/// A compile-time format string. Use `format_string` in the public API to
2678+
/// prevent type deduction.
26632679
template <typename... T> struct fstring {
26642680
private:
26652681
static constexpr int num_static_named_args =

3rdparty/fmt/include/fmt/format.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,6 @@ FMT_END_NAMESPACE
151151
# endif // FMT_USE_EXCEPTIONS
152152
#endif // FMT_THROW
153153

154-
#ifdef FMT_NO_UNIQUE_ADDRESS
155-
// Use the provided definition.
156-
#elif FMT_CPLUSPLUS < 202002L
157-
// Not supported.
158-
#elif FMT_HAS_CPP_ATTRIBUTE(no_unique_address)
159-
# define FMT_NO_UNIQUE_ADDRESS [[no_unique_address]]
160-
// VS2019 v16.10 and later except clang-cl (https://reviews.llvm.org/D110485).
161-
#elif FMT_MSC_VERSION >= 1929 && !FMT_CLANG_VERSION
162-
# define FMT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
163-
#endif
164-
#ifndef FMT_NO_UNIQUE_ADDRESS
165-
# define FMT_NO_UNIQUE_ADDRESS
166-
#endif
167-
168154
// Defining FMT_REDUCE_INT_INSTANTIATIONS to 1, will reduce the number of
169155
// integer formatter template instantiations to just one by only using the
170156
// largest integer type. This results in a reduction in binary size but will

0 commit comments

Comments
 (0)