summaryrefslogtreecommitdiffstats
path: root/SetFlags.cmake
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-01-02 14:03:15 +0100
committerAlexander Harkness <me@bearbin.net>2022-01-13 00:48:19 +0100
commitbc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937 (patch)
tree74423c634ca8e46dc4b1105a8cb007d2346cc468 /SetFlags.cmake
parentFix compilation with Clang 13.0.0 (diff)
downloadcuberite-bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937.tar
cuberite-bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937.tar.gz
cuberite-bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937.tar.bz2
cuberite-bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937.tar.lz
cuberite-bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937.tar.xz
cuberite-bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937.tar.zst
cuberite-bc332ebb9cfb594e65f2c1e2e2a61c6bfe9bf937.zip
Diffstat (limited to '')
-rw-r--r--SetFlags.cmake11
1 files changed, 10 insertions, 1 deletions
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()