File tree Expand file tree Collapse file tree 3 files changed +6
-30
lines changed
Expand file tree Collapse file tree 3 files changed +6
-30
lines changed Original file line number Diff line number Diff line change 11cpmaddpackage("gh:fmtlib/fmt#10.2.0" )
22
3- add_library (errors_format src/format.cpp )
3+ add_library (errors_format INTERFACE )
44target_sources (
55 errors_format PUBLIC
66 FILE_SET HEADERS
77 BASE_DIRS include
88 FILES include /errors/format.hpp
99)
10- target_link_libraries (errors_format PUBLIC errors fmt)
10+ target_link_libraries (errors_format INTERFACE errors fmt)
1111
1212if (NOT_SUBPROJECT)
1313 if (BUILD_TESTING)
1414 # Append the main library properties instead of linking the library.
15- get_target_property (errors_format_SOURCES errors_format SOURCES )
1615 get_target_property (errors_format_HEADER_DIRS errors_format HEADER_DIRS)
17- get_target_property (errors_format_LIBRARIES errors_format LINK_LIBRARIES )
16+ get_target_property (errors_format_LIBRARIES errors_format INTERFACE_LINK_LIBRARIES )
1817
1918 # Build tests for the main library
20- add_executable (errors_format_test test /format_test.cpp ${errors_format_SOURCES} )
19+ add_executable (errors_format_test test /format_test.cpp)
2120 target_include_directories (errors_format_test PRIVATE ${errors_format_HEADER_DIRS} )
2221 target_link_libraries (errors_format_test PRIVATE Catch2::Catch2WithMain ${errors_format_LIBRARIES} )
2322
Original file line number Diff line number Diff line change 22
33#include < errors/error.hpp>
44#include < fmt/core.h>
5+ #include < fmt/ostream.h>
56
67namespace errors {
78
@@ -17,15 +18,6 @@ Error format(fmt::format_string<T...> fmt, T&&... args);
1718
1819} // namespace errors
1920
20- namespace fmt {
21-
22- template <>
23- struct formatter <errors::Error> {
24- format_parse_context::iterator parse (format_parse_context& ctx) const ;
25- format_context::iterator format (const errors::Error& err,
26- format_context& ctx) const ;
27- };
28-
29- } // namespace fmt
21+ template <> struct fmt ::formatter<errors::Error> : ostream_formatter {};
3022
3123#include " format.ipp"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments