Skip to content

Commit

Permalink
Updated fmt support
Browse files Browse the repository at this point in the history
  • Loading branch information
david-antiteum committed Nov 20, 2024
1 parent 68ed9de commit 3a45c0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
27 changes: 14 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,10 @@ include( Tools )

project( consulcpp VERSION 0.2.2 DESCRIPTION "A C++ library that implements the Consul API" LANGUAGES CXX )

option( BUILD_EXAMPLES "Build examples" ON )
option( BUILD_EXAMPLES "Build examples" OFF )
option( BUILD_TESTING "Build tests" OFF )
option( ADD_COVERAGE "Add coverage" OFF )

if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include( CTest )
if( ADD_COVERAGE )
include( CodeCoverage )
append_coverage_compiler_flags()
setup_target_for_coverage_gcovr(
NAME coverage
EXECUTABLE consulcpp-test
)
endif()
endif()

sonarqube_setup()

add_subdirectory( src )
Expand All @@ -30,4 +19,16 @@ if( BUILD_EXAMPLES )
endif()
if( BUILD_TESTING )
add_subdirectory( tests )

if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include( CTest )
if( ADD_COVERAGE )
include( CodeCoverage )
append_coverage_compiler_flags()
setup_target_for_coverage_gcovr(
NAME coverage
EXECUTABLE consulcpp-test
)
endif()
endif()
endif()
2 changes: 1 addition & 1 deletion src/internal/HttpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace fmt {
constexpr auto parse(ParseContext &ctx) { return ctx.begin(); }

template <typename FormatContext>
auto format(const http::status & s, FormatContext &ctx) {
auto format(const http::status & s, FormatContext &ctx) const {
return format_to(ctx.out(), "{}", static_cast<int>( s ) );
}
};
Expand Down

0 comments on commit 3a45c0d

Please sign in to comment.