Skip to content

Commit

Permalink
[c++] Add -Wno-deprecated-declarations for AppleClang
Browse files Browse the repository at this point in the history
Compilation of Bond on macOS Big Sur 11.2.2 with Xcode 12.4 with Apple
Clang version 12.0.0 (clang-1200.0.32.29) and Boost 1.75.0 fails due to
Boost.Locale's use of the now-depcreated `std::auto_ptr`:

```
In file included from /usr/local/include/boost/locale.hpp:24:
/usr/local/include/boost/locale/util.hpp:203:59: error: 'auto_ptr<boost::locale::util::base_converter>' is deprecated [-Werror,-Wdeprecated-declarations]
    std::locale create_codecvt(std::locale const &in,std::auto_ptr<base_converter> cvt,character_facet_type type);
```

Add `-Wno-deprecated-declarations` to the AppleClang compiler options.
This is what is done for Clang.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
  • Loading branch information
jviotti authored Mar 17, 2021
1 parent 133b209 commit bdc07dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ cxx_add_compile_options(AppleClang
--std=c++11
-Wall
-Werror
# Suppress warnings in Boost about using deprecated types like std::auto_ptr
-Wno-deprecated-declarations
-Wno-null-dereference
-Wno-unknown-warning-option
-Wno-unused-local-typedefs)
Expand Down

0 comments on commit bdc07dd

Please sign in to comment.