From 71fa82aa061a7e62ae6acb24196d037e0759c344 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 11 Nov 2020 21:35:18 +0000 Subject: [PATCH 1/5] import warning settings from fizzy --- CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30803bde3..cfc32bf53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,39 @@ elseif(CABLE_COMPILER_GNU) set(CMAKE_CXX_FLAGS_COVERAGE "--coverage") endif() +# -Wcast-qual +# -Wcast-align +# $<$:-Wold-style-cast> +add_compile_options( + -Wmissing-declarations + $<$:-Wextra-semi> +) +cable_add_cxx_compiler_flag_if_supported(-Wfinal-dtor-non-final-class) +cable_add_cxx_compiler_flag_if_supported(-Wnewline-eof) +cable_add_cxx_compiler_flag_if_supported(-Wsuggest-destructor-override) +cable_add_cxx_compiler_flag_if_supported(-Wunreachable-code-break) +cable_add_cxx_compiler_flag_if_supported(-Wduplicated-cond) +cable_add_cxx_compiler_flag_if_supported(-Wduplicate-enum) +cable_add_cxx_compiler_flag_if_supported(-Wlogical-op) +cable_add_cxx_compiler_flag_if_supported(-Wno-unknown-attributes) + +if(CMAKE_CXX_COMPILER_ID MATCHES Clang) + option(WEVERYTHING "Enable almost all compiler warnings" OFF) + if(WEVERYTHING) + add_compile_options(-Weverything) + add_compile_options( + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-covered-switch-default + -Wno-double-promotion + -Wno-float-equal + -Wno-padded + -Wno-return-std-move-in-c++11 + -Wno-switch-enum + ) + endif() +endif() + set(EVMC_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include) add_subdirectory(lib) From 6cc89c3045df8741f00471ee799e7b801dc44178 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 11 Nov 2020 21:58:54 +0000 Subject: [PATCH 2/5] enofrce less warnings --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfc32bf53..a6d32217c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Clang) -Wno-padded -Wno-return-std-move-in-c++11 -Wno-switch-enum + -Wno-cast-qual + -Wno-cast-align + -Wno-old-style-cast + -Wno-weak-vtables + -Wno-documentation + -Wno-documentation-unknown-command ) endif() endif() From 2f71c785fc762f04aec1ba5029f1899f814a3686 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 9 Dec 2020 22:03:44 +0000 Subject: [PATCH 3/5] f --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a6d32217c..3f569b35e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Clang) -Wno-weak-vtables -Wno-documentation -Wno-documentation-unknown-command + -Wno-bad-function-cast ) endif() endif() From 931b82b246681a9e3539ee45c74a298316648cde Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 23 Mar 2021 12:02:20 +0000 Subject: [PATCH 4/5] cmake --- CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f569b35e..58dfb43ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,13 +83,6 @@ add_compile_options( -Wmissing-declarations $<$:-Wextra-semi> ) -cable_add_cxx_compiler_flag_if_supported(-Wfinal-dtor-non-final-class) -cable_add_cxx_compiler_flag_if_supported(-Wnewline-eof) -cable_add_cxx_compiler_flag_if_supported(-Wsuggest-destructor-override) -cable_add_cxx_compiler_flag_if_supported(-Wunreachable-code-break) -cable_add_cxx_compiler_flag_if_supported(-Wduplicated-cond) -cable_add_cxx_compiler_flag_if_supported(-Wduplicate-enum) -cable_add_cxx_compiler_flag_if_supported(-Wlogical-op) cable_add_cxx_compiler_flag_if_supported(-Wno-unknown-attributes) if(CMAKE_CXX_COMPILER_ID MATCHES Clang) From 585c305fe29946a419349353aaf484c4c24fec44 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 23 Mar 2021 12:10:48 +0000 Subject: [PATCH 5/5] cmake --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58dfb43ca..b456380e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,11 +76,11 @@ elseif(CABLE_COMPILER_GNU) set(CMAKE_CXX_FLAGS_COVERAGE "--coverage") endif() -# -Wcast-qual -# -Wcast-align -# $<$:-Wold-style-cast> add_compile_options( + #-Wcast-qual + #-Wcast-align -Wmissing-declarations + $<$:-Wold-style-cast> $<$:-Wextra-semi> ) cable_add_cxx_compiler_flag_if_supported(-Wno-unknown-attributes) @@ -105,6 +105,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Clang) -Wno-documentation -Wno-documentation-unknown-command -Wno-bad-function-cast + -Wno-exit-time-destructors ) endif() endif()