commit | fb86c6aad9e8f2c8ad67e5a352d5801c2609834c | [log] [tgz] |
---|---|---|
author | Nicolas Capens <capn@google.com> | Tue Feb 05 15:13:08 2019 -0500 |
committer | Nicolas Capens <nicolascapens@google.com> | Wed Feb 06 01:56:40 2019 +0000 |
tree | b94a2230e045068e5ca1d6341b94844b50d7ef08 | |
parent | 09a91e48c066c1584619ae0009e72fe09329115e [diff] |
Suppress Clang warning for unsupported warning. Clang doesn't support the unused-lambda-capture warning until version 5.0: http://releases.llvm.org/5.0.0/tools/clang/docs/DiagnosticsReference.html#wunused-lambda-capture Bug b/123933266 Change-Id: I6c5681a64e08ab479d726679ec18447dec926630 Reviewed-on: https://swiftshader-review.googlesource.com/c/24448 Tested-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt index 054ad5b..7da2b52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -205,7 +205,8 @@ set_cpp_flag("-Werror=missing-braces") set_cpp_flag("-fno-exceptions") - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND + CLANG_VERSION_STRING VERSION_GREATER_EQUAL 5) set_cpp_flag("-Werror=unused-lambda-capture") endif()