Skip to content

Commit a1e8747

Browse files
committed
Decouple -Werror from MORE_WARNINGS
1 parent 3eca224 commit a1e8747

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ else()
153153
-Wno-gnu-zero-variadic-macro-arguments)
154154

155155
if(MORE_WARNINGS)
156-
add_compile_options(-Werror -Wextra
156+
add_compile_options(-Wextra
157157
-Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond
158158
-Wfloat-equal -Wlogical-op -Wnull-dereference -Wold-style-cast -Wshift-overflow=2
159159
-Wstringop-overflow=4 -Wtrampolines -Wundef -Wuninitialized -Wunused -Wshadow

CMakePresets.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"cacheVariables": {
88
"CMAKE_BUILD_TYPE": "Debug",
99
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
10+
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
11+
"CMAKE_LINK_WARNING_AS_ERROR": true,
1012
"MORE_WARNINGS": true,
1113
"SANITIZERS": true
1214
},

0 commit comments

Comments
 (0)