diff --git a/CMakeLists.txt b/CMakeLists.txt index 05198b8..a2f1e02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ find_cppkg(nlohmann_json 3.9.1 MODULE nlohmann_json::nlohmann_json TYPE lib OPT find_cppkg(ryml 0.2.0 MODULE ryml::ryml TYPE lib OPTIONAL OFF) find_cppkg(toml11 3.7.0 MODULE toml11::toml11 TYPE lib OPTIONAL OFF) find_cppkg(yaml-cpp 0.6.3 MODULE yaml-cpp TYPE lib OPTIONAL OFF) -find_cppkg(fmt 7.1.3 MODULE fmt::fmt TYPE lib OPTIONAL OFF) +find_cppkg(fmt 8.0.1 MODULE fmt::fmt-header-only TYPE lib OPTIONAL OFF) find_cppkg(magic_enum 0.7.3 MODULE magic_enum::magic_enum TYPE lib) find_cppkg(nameof 0.10.0 MODULE nameof::nameof TYPE lib) diff --git a/cppm.toml b/cppm.toml index 7ba3c95..4d8a45e 100644 --- a/cppm.toml +++ b/cppm.toml @@ -66,7 +66,7 @@ [dependencies] nameof = { version="0.10.0", link="public"} magic_enum = { version= "0.7.3", link="public"} - fmt = {version="7.1.3", link="public", optional=true} + fmt = {version="8.0.1", link="public", optional=true} yaml-cpp = { version="0.6.3", link="public", optional=true} toml11 = { version="3.7.0", link="public", optional=true} ryml = { version= "0.2.0", link="public", optional=true} diff --git a/examples/parse_file.cpp b/examples/parse_file.cpp index f54cc94..cc429a3 100644 --- a/examples/parse_file.cpp +++ b/examples/parse_file.cpp @@ -1,5 +1,4 @@ #include "serdepp/serde.hpp" - #include "serdepp/adaptor/nlohmann_json.hpp" #include "serdepp/adaptor/rapidjson.hpp" #include "serdepp/adaptor/toml11.hpp" diff --git a/include/serdepp/adaptor/fmt.hpp b/include/serdepp/adaptor/fmt.hpp index 40566dc..972e9cf 100644 --- a/include/serdepp/adaptor/fmt.hpp +++ b/include/serdepp/adaptor/fmt.hpp @@ -10,18 +10,18 @@ template struct fmt::formatter, char>> : fmt::formatter { - template - auto format(const T& serde_type, format_ctx& ctx) { - return formatter::format(serde::to_string(serde_type), ctx); - } -}; - -template<> -struct fmt::formatter : fmt::formatter { - template - auto format(const serde::serde_sstream& serde_type, format_ctx& ctx) { - return formatter::format(serde_type.str(), ctx); + template + auto format(const T& serde_type, FormatCtx& ctx) { + return fmt::formatter::format(serde::to_string(serde_type), ctx); } }; +// +//template<> +//struct fmt::formatter : fmt::formatter { +// template +// auto format(const serde::serde_sstream& serde_type, FormatCtx& ctx) { +// return fmt::formatter::format(serde_type.str(), ctx); +// } +//}; #endif diff --git a/thirdparty/fmt/8.0.1/cppkg.toml b/thirdparty/fmt/8.0.1/cppkg.toml index bde3637..90efc7e 100644 --- a/thirdparty/fmt/8.0.1/cppkg.toml +++ b/thirdparty/fmt/8.0.1/cppkg.toml @@ -1,6 +1,6 @@ [fmt] version = "8.0.1" description = "A modern formatting library" -module = "fmt::fmt" +module = "fmt::fmt-header-only" url="https://github.com/fmtlib/fmt/releases/download/8.0.1/fmt-8.0.1.zip" flags="-DFMT_DOC=OFF -DFMT_TEST=OFF" \ No newline at end of file diff --git a/thirdparty/fmt/8.0.1/fmt.cmake.in b/thirdparty/fmt/8.0.1/fmt.cmake.in index e313c21..a0cbb18 100644 --- a/thirdparty/fmt/8.0.1/fmt.cmake.in +++ b/thirdparty/fmt/8.0.1/fmt.cmake.in @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.6) project(fmt-8.0.1-install) -set(CPPM_VERSION 0.0.13) +set(CPPM_VERSION ${CPPM_VERSION}) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cppm_loader.cmake) -download_package(fmt 8.0.1 URL https://github.com/fmtlib/fmt/releases/download/8.0.1/fmt-8.0.1.zip TYPE lib CMAKE_ARGS ${CMAKE_ARGS} -DFMT_DOC=OFF -DFMT_TEST=OFF -DFMT_FUZZ=OFF) +download_package(fmt 8.0.1 URL https://github.com/fmtlib/fmt/releases/download/8.0.1/fmt-8.0.1.zip TYPE lib CMAKE_ARGS ${CMAKE_ARGS} -DFMT_DOC=OFF -DFMT_TEST=OFF)