diff options
author | bunnei <bunneidev@gmail.com> | 2021-07-05 17:09:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 17:09:23 -0700 |
commit | bf50345d4c13e34e69af0070632400b3472a1a11 (patch) | |
tree | 1af5586d2d416c1a347ea0bfabed30a3a56d51e0 /src/CMakeLists.txt | |
parent | 3d03a6ae0232780ed6fb28e52dbdc5221cb3a7bf (diff) | |
parent | 248a146ab79b732cd02632f5ecf58d70ba3bce91 (diff) |
Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1c3dde31d..65a4922ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -45,14 +45,23 @@ if (MSVC) /Zc:inline /Zc:throwingNew + # External headers diagnostics + /experimental:external # Enables the external headers options. This option isn't required in Visual Studio 2019 version 16.10 and later + /external:anglebrackets # Treats all headers included by #include <header>, where the header file is enclosed in angle brackets (< >), as external headers + /external:W0 # Sets the default warning level to 0 for external headers, effectively turning off warnings for external headers + # Warnings /W3 - /we4062 # enumerator 'identifier' in a switch of enum 'enumeration' is not handled + /we4018 # 'expression': signed/unsigned mismatch + /we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled /we4101 # 'identifier': unreferenced local variable /we4189 # 'identifier': local variable is initialized but not referenced /we4265 # 'class': class has virtual functions, but destructor is not virtual - /we4388 # signed/unsigned mismatch - /we4547 # 'operator' : operator before comma has no effect; expected operator with side-effect + /we4267 # 'var': conversion from 'size_t' to 'type', possible loss of data + /we4305 # 'context': truncation from 'type1' to 'type2' + /we4388 # 'expression': signed/unsigned mismatch + /we4389 # 'operator': signed/unsigned mismatch + /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'? /we4555 # Expression has no effect; expected expression with side-effect /we4715 # 'function': not all control paths return a value |