From bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sun, 2 Jan 2022 14:03:15 +0100 Subject: Fix build on Clang < 12 --- SetFlags.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SetFlags.cmake b/SetFlags.cmake index 51b998247..2cae04b78 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-reserved-identifier + -Wno-double-promotion # This is a pretty useless warning, we've already got -Wswitch which is what we need: -Wno-switch-enum @@ -186,5 +186,14 @@ function(set_exe_flags TARGET) -Wno-implicit-int-float-conversion ) endif() + + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13) + target_compile_options( + ${TARGET} PRIVATE + + # TODO: fix + -Wno-reserved-identifier + ) + endif() endif() endfunction() -- cgit v1.2.3