diff options
| author | 2023-06-18 19:57:14 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:55 -0400 | |
| commit | 3f0cc544cf7184adacec22aedd81f6d796bbea31 (patch) | |
| tree | 16bb9ab8dc1b20fe4767a6f0bf94954f8cfad7d6 /src/common/CMakeLists.txt | |
| parent | settings_setting: Fix MSVC error (diff) | |
| download | yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar.gz yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar.xz yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.zip | |
common,yuzu-qt: Avoid explicit instantiation on old clang
Clang versions < 15 have compile issues with explicit instantiation.
Disable it for these versions.
Diffstat (limited to 'src/common/CMakeLists.txt')
| -rw-r--r-- | src/common/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 09e7e673e..cf05ae364 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -197,10 +197,15 @@ if (MSVC) | |||
| 197 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data | 197 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data |
| 198 | /we4800 # Implicit conversion from 'type' to bool. Possible information loss | 198 | /we4800 # Implicit conversion from 'type' to bool. Possible information loss |
| 199 | ) | 199 | ) |
| 200 | else() | 200 | endif() |
| 201 | |||
| 202 | if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
| 201 | target_compile_options(common PRIVATE | 203 | target_compile_options(common PRIVATE |
| 202 | $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation> | 204 | -fsized-deallocation |
| 203 | $<$<CXX_COMPILER_ID:Clang>:-Werror=unreachable-code-aggressive> | 205 | -Werror=unreachable-code-aggressive |
| 206 | ) | ||
| 207 | target_compile_definitions(common PRIVATE | ||
| 208 | $<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,15>:_CANNOT_EXPLICITLY_INSTANTIATE> | ||
| 204 | ) | 209 | ) |
| 205 | endif() | 210 | endif() |
| 206 | 211 | ||