mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 11:15:56 +00:00
fix: Add -Wno-deprecated-declarations for Clang only (#5680)
This change adds `-Wno-deprecated-declarations` for Clang only (not for GCC) builds in `cmake/RippledCompiler.cmake`.
This commit is contained in:
@@ -94,6 +94,7 @@ else ()
|
||||
INTERFACE
|
||||
-Wall
|
||||
-Wdeprecated
|
||||
$<$<BOOL:${is_clang}>:-Wno-deprecated-declarations>
|
||||
$<$<BOOL:${wextra}>:-Wextra -Wno-unused-parameter>
|
||||
$<$<BOOL:${werr}>:-Werror>
|
||||
-fstack-protector
|
||||
|
||||
@@ -22,18 +22,8 @@
|
||||
|
||||
#include <xrpl/basics/contract.h>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#include <boost/outcome.hpp>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -24,35 +24,10 @@
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
/*
|
||||
|
||||
Workaround for overzealous clang warning, which trips on libstdc++ headers
|
||||
|
||||
In file included from
|
||||
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:61:
|
||||
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8:
|
||||
error: 'get_temporary_buffer<std::pair<ripple::Quality, const
|
||||
std::vector<std::unique_ptr<ripple::Step>> *>>' is deprecated
|
||||
[-Werror,-Wdeprecated-declarations] 263 |
|
||||
std::get_temporary_buffer<value_type>(_M_original_len));
|
||||
^
|
||||
*/
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#include <functional>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
|
||||
Reference in New Issue
Block a user