Skip to content

Commit

Permalink
silence -Wfloat-equal warning in libfmt format.h
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd authored Feb 14, 2025
1 parent 69a0cab commit e9c5ce5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/QuillUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function(set_common_compile_options target_name)
target_compile_options(${target_name} ${COMPILE_OPTIONS_VISIBILITY}
# General warnings for Clang, AppleClang, and GNU
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -pedantic -Werror -Wredundant-decls>
-Wall -Wextra -pedantic -Werror -Wredundant-decls -Wfloat-equal>

# Disable C++20 extension warnings for Clang > 17
$<$<AND:$<CXX_COMPILER_ID:Clang>,$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,17>>:
Expand Down
9 changes: 9 additions & 0 deletions include/quill/bundled/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

#include "base.h"

#if defined(__GNUC__) || defined(__clang__) || defined(__MINGW32__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif

#ifndef FMTQUILL_MODULE
# include <cmath> // std::signbit
# include <cstddef> // std::byte
Expand Down Expand Up @@ -4238,4 +4243,8 @@ FMTQUILL_END_NAMESPACE
# undef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
#endif

#if defined(__GNUC__) || defined(__clang__) || defined(__MINGW32__)
#pragma GCC diagnostic pop
#endif

#endif // FMTQUILL_FORMAT_H_

0 comments on commit e9c5ce5

Please sign in to comment.