diff options
author | David Benjamin <davidben@google.com> | 2024-05-29 11:58:19 -0400 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-05-29 16:47:59 +0000 |
commit | 4a7815c94077eebb3546fc287d1fa0e1356a2cd0 (patch) | |
tree | 57f84c96a7d8e7ca2d89f2bec1661a9d8e7586b6 /CMakeLists.txt | |
parent | 5326e94dd188beba0a5e536b1d2723aee65bd85d (diff) | |
download | boringssl-4a7815c94077eebb3546fc287d1fa0e1356a2cd0.zip boringssl-4a7815c94077eebb3546fc287d1fa0e1356a2cd0.tar.gz boringssl-4a7815c94077eebb3546fc287d1fa0e1356a2cd0.tar.bz2 |
Fix build with -Wctad-maybe-unsupported
The immediate use of CTAD was actually unnecessary due to CBS implicitly
converting to Span. Still, let's make Span CTAD-capable and thus remove
some unnecessary MakeSpans and MakeConstSpans in libpki. I've kept them
in libssl which, for now, still allows C++14.
Change-Id: Iec92f520f645f86f098afb860a2129fb30c61da9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/68847
Commit-Queue: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 39352d6..d5acdc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,6 +152,14 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CLANG) set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wframe-larger-than=25344") endif() + # -Wctad-maybe-unsupported was added in Clang 10, which is AppleClang 12.0.0. + if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND + CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0.0") OR + (CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND + CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "12.0.0")) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wctad-maybe-unsupported") + endif() + if(CLANG OR CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0.0") set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wimplicit-fallthrough") endif() |