From a716d78264a136211311c92a2f573b4ca23af742 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 13 Aug 2022 06:06:01 +0200 Subject: [PATCH] Support build with clang-16 --- CMakeLists.txt | 3 ++- cmake/warnings.cmake | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d5ce1996f3..e3eff050015 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,8 @@ if (COMPILER_CLANG) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -fuse-ctor-homing") endif() endif() + + no_warning(enum-constexpr-conversion) # breaks Protobuf in clang-16 endif () # If compiler has support for -Wreserved-identifier. It is difficult to detect by clang version, @@ -606,4 +608,3 @@ if (NATIVE_BUILD_TARGETS COMMAND ${CMAKE_COMMAND} --build "${NATIVE_BUILD_DIR}" --target ${NATIVE_BUILD_TARGETS} COMMAND_ECHO STDOUT) endif () - diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index a8f12fe26dd..042935a835f 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -42,6 +42,7 @@ if (COMPILER_CLANG) no_warning(weak-template-vtables) no_warning(weak-vtables) no_warning(thread-safety-negative) # experimental flag, too many false positives + no_warning(enum-constexpr-conversion) # breaks magic-enum library in clang-16 # TODO Enable conversion, sign-conversion, double-promotion warnings. elseif (COMPILER_GCC) # Add compiler options only to c++ compiler