Skip to content

Commit

Permalink
Merge branch 'gabime:v1.x' into v1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellGengYF authored Aug 2, 2024
2 parents fd8a848 + 5ebfc92 commit fee6148
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ elseif(NOT CMAKE_CXX_STANDARD)
endif()

# make sure __cplusplus is defined when using msvc and enable parallel build
if(MSVC)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP")
endif()

Expand Down Expand Up @@ -161,7 +161,7 @@ if(SPDLOG_BUILD_SHARED OR BUILD_SHARED_LIBS)
endif()
add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS})
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
if(MSVC)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(spdlog PUBLIC $<$<AND:$<CXX_COMPILER_ID:MSVC>,$<NOT:$<COMPILE_LANGUAGE:CUDA>>>:/wd4251
/wd4275>)
endif()
Expand Down
2 changes: 1 addition & 1 deletion example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ struct my_type {
#ifndef SPDLOG_USE_STD_FORMAT // when using fmtlib
template <>
struct fmt::formatter<my_type> : fmt::formatter<std::string> {
auto format(my_type my, format_context &ctx) -> decltype(ctx.out()) {
auto format(my_type my, format_context &ctx) const -> decltype(ctx.out()) {
return fmt::format_to(ctx.out(), "[my_type i={}]", my.i);
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/spdlog/sinks/rotating_file_sink-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::calc_filename(const filename

filename_t basename, ext;
std::tie(basename, ext) = details::file_helper::split_by_extension(filename);
return fmt_lib::format(SPDLOG_FILENAME_T("{}.{}{}"), basename, index, ext);
return fmt_lib::format(SPDLOG_FMT_STRING(SPDLOG_FILENAME_T("{}.{}{}")), basename, index, ext);
}

template <typename Mutex>
Expand Down

0 comments on commit fee6148

Please sign in to comment.