Skip to content

Commit

Permalink
Update fmt package to 9.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
apivovarov committed Jun 28, 2023
1 parent 0bfdf60 commit 962c5e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ hunter_default_version(filament VERSION 1.9.8)
hunter_default_version(fixesproto VERSION 5.0)
hunter_default_version(flatbuffers VERSION 2.0.0)
hunter_default_version(flex VERSION 2.6.4)
hunter_default_version(fmt VERSION 8.1.1)
hunter_default_version(fmt VERSION 9.1.0)
hunter_default_version(folly VERSION 2018.10.22.00-p4)
hunter_default_version(freetype VERSION 2.10.4-p0)
hunter_default_version(freetype-gl VERSION 0.0.0-1a8c007-p0)
Expand Down
11 changes: 11 additions & 0 deletions cmake/projects/fmt/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,17 @@ hunter_add_version(
9577d6de8f4e268690b099976810ade9ebef5fb5
)

hunter_add_version(
PACKAGE_NAME
fmt
VERSION
"9.1.0"
URL
"https://github.com/fmtlib/fmt/archive/9.1.0.tar.gz"
SHA1
6c0db60f3fa7bd4cf58edc777a2408e0ddfb28b9
)

hunter_cmake_args(
fmt
CMAKE_ARGS
Expand Down
7 changes: 3 additions & 4 deletions examples/fmt/fmtexample.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#include <fmt/format.h>
#include <fmt/core.h>
#include <fmt/core.h> // The core API should be enough for the example below. The full format API is fmt/format.h

int main() {
fmt::print("Hello world\nThis is fmt(ex-cppformat)\n");
std::string as_string = fmt::format("The answer is {}", 42);
fmt::memory_buffer buf;
format_to(buf, "{}\nThe previous line and this message were bufferred in memory", as_string);
auto buf = fmt::memory_buffer();
fmt::format_to(std::back_inserter(buf), "{}\nThe previous line and this message were bufferred in memory", as_string);
fmt::print(stderr, "{}\nAnd then were printed to stderr\n", buf.data());
fmt::print("Fmt supports many nice features, see {url} for details\n", fmt::arg("url", "https://github.com/fmtlib/fmt"));
}

0 comments on commit 962c5e8

Please sign in to comment.