summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2021-09-27 20:58:18 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-28 01:27:05 +0000
commit3049cabccd7610a7fa8a9ad7fd24b6afebc928d8 (patch)
tree117a0383825fe68364ccc7ea3e954457147d6629 /SConstruct
parent8ab09b72fbd807ff03a9f6a7d538d0335478c9c6 (diff)
downloadmongo-3049cabccd7610a7fa8a9ad7fd24b6afebc928d8.tar.gz
SERVER-59234 Don't warn about deprecations in C++20 mode
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct12
1 files changed, 12 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 05f2a8e6bc6..07dc5e427ab 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2974,6 +2974,18 @@ def doConfigure(myenv):
# only) flag that turns it on.
AddToCXXFLAGSIfSupported(myenv, "-Wunused-exception-parameter")
+ # TODO(SERVER-60151): Avoid the dilemma identified in
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100493. Unfortunately,
+ # we don't have a more targeted warning suppression we can use
+ # other than disabling all deprecation warnings. We will
+ # revisit this once we are fully on C++20 and can commit the
+ # C++20 style code.
+ #
+ # TODO(SERVER-60175): In fact we will want to explicitly opt
+ # in to -Wdeprecated, since clang doesn't include it in -Wall.
+ if get_option('cxx-std') == "20":
+ AddToCXXFLAGSIfSupported(myenv, '-Wno-deprecated')
+
# Check if we can set "-Wnon-virtual-dtor" when "-Werror" is set. The only time we can't set it is on
# clang 3.4, where a class with virtual function(s) and a non-virtual destructor throws a warning when
# it shouldn't.