Fix build on Clang < 12

This commit is contained in:
Bond_009 2022-01-02 14:03:15 +01:00 committed by Alexander Harkness
parent 1a31098182
commit bc332ebb9c

View File

@ -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()