diff options
| author | yangwei <[email protected]> | 2024-08-07 11:34:52 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-08-12 15:47:05 +0800 |
| commit | 526171618ff2e51ac86704095cf218b6e2d86702 (patch) | |
| tree | 9d086fa1ded59434f4c41d0aabbbfd8f37c1c57e /CMakeLists.txt | |
| parent | 0c6b441157113fd9cdac1bf77e788ae2b651e792 (diff) | |
🔧 build(compile Werror): reduce warning
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 5 |
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() |
