diff options
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3575a3cb3..0ac3d254e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
| @@ -58,13 +58,11 @@ if (MSVC) | |||
| 58 | 58 | ||
| 59 | # Warnings | 59 | # Warnings |
| 60 | /W3 | 60 | /W3 |
| 61 | /we4018 # 'expression': signed/unsigned mismatch | 61 | /WX |
| 62 | |||
| 62 | /we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled | 63 | /we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled |
| 63 | /we4101 # 'identifier': unreferenced local variable | ||
| 64 | /we4189 # 'identifier': local variable is initialized but not referenced | 64 | /we4189 # 'identifier': local variable is initialized but not referenced |
| 65 | /we4265 # 'class': class has virtual functions, but destructor is not virtual | 65 | /we4265 # 'class': class has virtual functions, but destructor is not virtual |
| 66 | /we4267 # 'var': conversion from 'size_t' to 'type', possible loss of data | ||
| 67 | /we4305 # 'context': truncation from 'type1' to 'type2' | ||
| 68 | /we4388 # 'expression': signed/unsigned mismatch | 66 | /we4388 # 'expression': signed/unsigned mismatch |
| 69 | /we4389 # 'operator': signed/unsigned mismatch | 67 | /we4389 # 'operator': signed/unsigned mismatch |
| 70 | /we4456 # Declaration of 'identifier' hides previous local declaration | 68 | /we4456 # Declaration of 'identifier' hides previous local declaration |
| @@ -75,10 +73,13 @@ if (MSVC) | |||
| 75 | /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect | 73 | /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect |
| 76 | /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'? | 74 | /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'? |
| 77 | /we4555 # Expression has no effect; expected expression with side-effect | 75 | /we4555 # Expression has no effect; expected expression with side-effect |
| 78 | /we4715 # 'function': not all control paths return a value | 76 | /we4826 # Conversion from 'type1' to 'type2' is sign-extended. This may cause unexpected runtime behavior. |
| 79 | /we4834 # Discarding return value of function with 'nodiscard' attribute | ||
| 80 | /we5038 # data member 'member1' will be initialized after data member 'member2' | 77 | /we5038 # data member 'member1' will be initialized after data member 'member2' |
| 78 | /we5233 # explicit lambda capture 'identifier' is not used | ||
| 81 | /we5245 # 'function': unreferenced function with internal linkage has been removed | 79 | /we5245 # 'function': unreferenced function with internal linkage has been removed |
| 80 | |||
| 81 | /wd4100 # 'identifier': unreferenced formal parameter | ||
| 82 | /wd4324 # 'struct_name': structure was padded due to __declspec(align()) | ||
| 82 | ) | 83 | ) |
| 83 | 84 | ||
| 84 | if (USE_CCACHE) | 85 | if (USE_CCACHE) |
| @@ -99,24 +100,18 @@ if (MSVC) | |||
| 99 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE) | 100 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE) |
| 100 | else() | 101 | else() |
| 101 | add_compile_options( | 102 | add_compile_options( |
| 102 | -Wall | 103 | -Werror=all |
| 103 | -Werror=array-bounds | 104 | -Werror=extra |
| 104 | -Werror=implicit-fallthrough | ||
| 105 | -Werror=missing-declarations | 105 | -Werror=missing-declarations |
| 106 | -Werror=missing-field-initializers | ||
| 107 | -Werror=reorder | ||
| 108 | -Werror=shadow | 106 | -Werror=shadow |
| 109 | -Werror=sign-compare | 107 | -Werror=unused |
| 110 | -Werror=switch | 108 | |
| 111 | -Werror=uninitialized | ||
| 112 | -Werror=unused-function | ||
| 113 | -Werror=unused-result | ||
| 114 | -Werror=unused-variable | ||
| 115 | -Wextra | ||
| 116 | -Wmissing-declarations | ||
| 117 | -Wno-attributes | 109 | -Wno-attributes |
| 118 | -Wno-invalid-offsetof | 110 | -Wno-invalid-offsetof |
| 119 | -Wno-unused-parameter | 111 | -Wno-unused-parameter |
| 112 | |||
| 113 | $<$<CXX_COMPILER_ID:Clang>:-Wno-braced-scalar-init> | ||
| 114 | $<$<CXX_COMPILER_ID:Clang>:-Wno-unused-private-field> | ||
| 120 | ) | 115 | ) |
| 121 | 116 | ||
| 122 | if (ARCHITECTURE_x86_64) | 117 | if (ARCHITECTURE_x86_64) |