diff options
| author | 2021-07-06 12:48:49 -0400 | |
|---|---|---|
| committer | 2021-07-06 12:50:09 -0400 | |
| commit | ebb82b0b8394781622afe132a0779dc25995b47b (patch) | |
| tree | 5498cdf8076ea2715ab6efb5ad5bd0cd96945a04 /src | |
| parent | Merge pull request #6537 from Morph1984/warnings (diff) | |
| download | yuzu-ebb82b0b8394781622afe132a0779dc25995b47b.tar.gz yuzu-ebb82b0b8394781622afe132a0779dc25995b47b.tar.xz yuzu-ebb82b0b8394781622afe132a0779dc25995b47b.zip | |
CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/audio_core/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/input_common/CMakeLists.txt | 3 |
4 files changed, 1 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 65a4922ea..f8ec8fea8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
| @@ -82,6 +82,7 @@ else() | |||
| 82 | -Werror=missing-declarations | 82 | -Werror=missing-declarations |
| 83 | -Werror=missing-field-initializers | 83 | -Werror=missing-field-initializers |
| 84 | -Werror=reorder | 84 | -Werror=reorder |
| 85 | -Werror=sign-compare | ||
| 85 | -Werror=switch | 86 | -Werror=switch |
| 86 | -Werror=uninitialized | 87 | -Werror=uninitialized |
| 87 | -Werror=unused-function | 88 | -Werror=unused-function |
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index d25a1a645..090dd19b1 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt | |||
| @@ -51,9 +51,6 @@ if (NOT MSVC) | |||
| 51 | target_compile_options(audio_core PRIVATE | 51 | target_compile_options(audio_core PRIVATE |
| 52 | -Werror=conversion | 52 | -Werror=conversion |
| 53 | -Werror=ignored-qualifiers | 53 | -Werror=ignored-qualifiers |
| 54 | -Werror=implicit-fallthrough | ||
| 55 | -Werror=reorder | ||
| 56 | -Werror=sign-compare | ||
| 57 | -Werror=shadow | 54 | -Werror=shadow |
| 58 | -Werror=unused-parameter | 55 | -Werror=unused-parameter |
| 59 | -Werror=unused-variable | 56 | -Werror=unused-variable |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 19b970981..b2b0dbe05 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -667,8 +667,6 @@ else() | |||
| 667 | target_compile_options(core PRIVATE | 667 | target_compile_options(core PRIVATE |
| 668 | -Werror=conversion | 668 | -Werror=conversion |
| 669 | -Werror=ignored-qualifiers | 669 | -Werror=ignored-qualifiers |
| 670 | -Werror=implicit-fallthrough | ||
| 671 | -Werror=sign-compare | ||
| 672 | -Werror=shadow | 670 | -Werror=shadow |
| 673 | 671 | ||
| 674 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> | 672 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> |
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index c3423c815..c4283a952 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -44,10 +44,7 @@ else() | |||
| 44 | -Werror | 44 | -Werror |
| 45 | -Werror=conversion | 45 | -Werror=conversion |
| 46 | -Werror=ignored-qualifiers | 46 | -Werror=ignored-qualifiers |
| 47 | -Werror=implicit-fallthrough | ||
| 48 | -Werror=reorder | ||
| 49 | -Werror=shadow | 47 | -Werror=shadow |
| 50 | -Werror=sign-compare | ||
| 51 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | 48 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> |
| 52 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | 49 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> |
| 53 | -Werror=unused-variable | 50 | -Werror=unused-variable |