summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-08-07 11:34:52 +0800
committerluwenpeng <[email protected]>2024-08-12 15:47:05 +0800
commit526171618ff2e51ac86704095cf218b6e2d86702 (patch)
tree9d086fa1ded59434f4c41d0aabbbfd8f37c1c57e /CMakeLists.txt
parent0c6b441157113fd9cdac1bf77e788ae2b651e792 (diff)
🔧 build(compile Werror): reduce warning
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 81d8315..cbfdacd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,11 @@ add_definitions(-D_GNU_SOURCE)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 11)
+#set warning as error
+add_compile_options(-Wall -Wextra -Werror
+ -Wno-error=implicit-fallthrough
+ -Wno-error=unused-parameter)
+
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()