Skip to content
Snippets Groups Projects
Commit c312252d authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

Merge branch 'fix_fmt_catch2' into 'dev'

Change fmt library to system and upgrade Catch2

See merge request !225
parents 10143f53 9afa948a
No related branches found
No related tags found
2 merge requests!318[Upd] release verision 0.5.0,!225Change fmt library to system and upgrade Catch2
Pipeline #61827 waiting for manual action
......@@ -115,9 +115,12 @@ if (PYBIND)
include(PybindDependency)
add_pybind_dependency(${module_name})
##
target_link_libraries(${pybind_module_name} PRIVATE fmt::fmt)
endif()
target_link_libraries(${module_name} PUBLIC Threads::Threads fmt::fmt)
target_link_libraries(${module_name} PRIVATE fmt::fmt)
target_link_libraries(${module_name} PUBLIC Threads::Threads)
target_compile_features(${module_name} PRIVATE cxx_std_14)
if (DOSANITIZE STREQUAL "ON")
......
......@@ -101,12 +101,12 @@ private:
template<>
struct fmt::formatter<Aidge::Elts_t> {
template<typename ParseContext>
inline constexpr auto parse(ParseContext& ctx) {
inline constexpr auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
return ctx.begin();
}
template<typename FormatContext>
inline auto format(Aidge::Elts_t const& elt, FormatContext& ctx) {
inline auto format(const Aidge::Elts_t& elt, FormatContext& ctx) const {
return fmt::format_to(ctx.out(), "{}:{}", elt.data, elt.token);
}
};
......
......@@ -63,6 +63,7 @@ endif()
target_link_libraries(tests${module_name} PRIVATE ${module_name})
target_link_libraries(tests${module_name} PRIVATE Catch2::Catch2WithMain)
target_link_libraries(tests${module_name} PRIVATE fmt::fmt)
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
include(CTest)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment