Skip to content
Snippets Groups Projects
Commit 9afa948a authored by Charles Villard's avatar Charles Villard Committed by Grégoire Kubler
Browse files

Change fmt library to system and upgrade Catch2

parent 10143f53
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
...@@ -115,9 +115,12 @@ if (PYBIND) ...@@ -115,9 +115,12 @@ if (PYBIND)
include(PybindDependency) include(PybindDependency)
add_pybind_dependency(${module_name}) add_pybind_dependency(${module_name})
## ##
target_link_libraries(${pybind_module_name} PRIVATE fmt::fmt)
endif() 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) target_compile_features(${module_name} PRIVATE cxx_std_14)
if (DOSANITIZE STREQUAL "ON") if (DOSANITIZE STREQUAL "ON")
......
...@@ -101,12 +101,12 @@ private: ...@@ -101,12 +101,12 @@ private:
template<> template<>
struct fmt::formatter<Aidge::Elts_t> { struct fmt::formatter<Aidge::Elts_t> {
template<typename ParseContext> template<typename ParseContext>
inline constexpr auto parse(ParseContext& ctx) { inline constexpr auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
return ctx.begin(); return ctx.begin();
} }
template<typename FormatContext> 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); return fmt::format_to(ctx.out(), "{}:{}", elt.data, elt.token);
} }
}; };
......
...@@ -63,6 +63,7 @@ endif() ...@@ -63,6 +63,7 @@ endif()
target_link_libraries(tests${module_name} PRIVATE ${module_name}) 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 Catch2::Catch2WithMain)
target_link_libraries(tests${module_name} PRIVATE fmt::fmt)
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras) list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
include(CTest) 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