From 4f85931c42ce4aad454a1dbf38a6f0565822056d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 7 Jul 2020 00:04:32 +0100 Subject: Address comments --- SetFlags.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'SetFlags.cmake') 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 -- cgit v1.2.3