mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-10 22:25:52 +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
|
INTERFACE
|
||||||
-Wall
|
-Wall
|
||||||
-Wdeprecated
|
-Wdeprecated
|
||||||
|
$<$<BOOL:${is_clang}>:-Wno-deprecated-declarations>
|
||||||
$<$<BOOL:${wextra}>:-Wextra -Wno-unused-parameter>
|
$<$<BOOL:${wextra}>:-Wextra -Wno-unused-parameter>
|
||||||
$<$<BOOL:${werr}>:-Werror>
|
$<$<BOOL:${werr}>:-Werror>
|
||||||
-fstack-protector
|
-fstack-protector
|
||||||
|
|||||||
@@ -22,18 +22,8 @@
|
|||||||
|
|
||||||
#include <xrpl/basics/contract.h>
|
#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>
|
#include <boost/outcome.hpp>
|
||||||
|
|
||||||
#if defined(__clang__)
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|||||||
@@ -24,35 +24,10 @@
|
|||||||
#include <boost/container/flat_set.hpp>
|
#include <boost/container/flat_set.hpp>
|
||||||
#include <boost/endian/conversion.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 <array>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <system_error>
|
#include <system_error>
|
||||||
|
|||||||
Reference in New Issue
Block a user