From 1a310981826b800b1a4a405eaef0612cf7b1cb70 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sun, 2 Jan 2022 12:11:54 +0100 Subject: Fix compilation with Clang 13.0.0 Clang 13 changes: * `-Wreserved-identifier` and `-Wunused-but-set-variable` got added * the `-Wreturn-std-move-in-c++11` option was removed Builds still fail when native optimizations are enabled --- SetFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index 869307d91..51b998247 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -158,7 +158,7 @@ function(set_exe_flags TARGET) # TODO: actually fix the warnings instead of disabling them # or at least disable on a file-level basis: -Wno-missing-noreturn -Wno-padded -Wno-implicit-fallthrough - -Wno-double-promotion + -Wno-double-promotion -Wno-reserved-identifier # This is a pretty useless warning, we've already got -Wswitch which is what we need: -Wno-switch-enum @@ -169,7 +169,7 @@ function(set_exe_flags TARGET) -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-error=unused-command-line-argument ) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) target_compile_options( ${TARGET} PRIVATE -- cgit v1.2.3