diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-07 01:04:32 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-12 23:00:07 +0200 |
commit | 4f85931c42ce4aad454a1dbf38a6f0565822056d (patch) | |
tree | 558b05e353d1b6984d6c9fd4fed80c6bc18fc56b /SetFlags.cmake | |
parent | Funktions (diff) | |
download | cuberite-4f85931c42ce4aad454a1dbf38a6f0565822056d.tar cuberite-4f85931c42ce4aad454a1dbf38a6f0565822056d.tar.gz cuberite-4f85931c42ce4aad454a1dbf38a6f0565822056d.tar.bz2 cuberite-4f85931c42ce4aad454a1dbf38a6f0565822056d.tar.lz cuberite-4f85931c42ce4aad454a1dbf38a6f0565822056d.tar.xz cuberite-4f85931c42ce4aad454a1dbf38a6f0565822056d.tar.zst cuberite-4f85931c42ce4aad454a1dbf38a6f0565822056d.zip |
Diffstat (limited to '')
-rw-r--r-- | SetFlags.cmake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake index d203c5d95..9c635b5fd 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -111,7 +111,7 @@ function(set_global_flags) endif() endfunction() -function(enable_warnings TARGET) +function(set_exe_flags TARGET) if (MSVC) # TODO: MSVC level 4, warnings as errors return () @@ -129,14 +129,6 @@ function(enable_warnings TARGET) # All warnings: -Wall -Wextra - - # TODO: actually fix the warnings instead of disabling them - # or at least disable on a file-level basis: - -Wno-unused-parameter -Wno-missing-noreturn -Wno-padded -Wno-implicit-fallthrough - -Wno-double-promotion - - # This is a pretty useless warning, we've already got -Wswitch which is what we need: - -Wno-switch-enum ) if(CMAKE_CXX_COMPILE_ID STREQUAL "Clang") @@ -146,6 +138,14 @@ function(enable_warnings TARGET) # Warnings-as-errors only on Clang for now: -Werror + # TODO: actually fix the warnings instead of disabling them + # or at least disable on a file-level basis: + -Wno-unused-parameter -Wno-missing-noreturn -Wno-padded -Wno-implicit-fallthrough + -Wno-double-promotion + + # This is a pretty useless warning, we've already got -Wswitch which is what we need: + -Wno-switch-enum + # Weverything with Clang exceptions: -Weverything -Wno-error=disabled-macro-expansion -Wno-weak-vtables -Wno-exit-time-destructors -Wno-string-conversion -Wno-c++98-compat-pedantic |