summaryrefslogtreecommitdiffstats
path: root/src/common/CMakeLists.txt
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-06-19 01:57:14 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 16:56:55 +0200
commit3f0cc544cf7184adacec22aedd81f6d796bbea31 (patch)
tree16bb9ab8dc1b20fe4767a6f0bf94954f8cfad7d6 /src/common/CMakeLists.txt
parentsettings_setting: Fix MSVC error (diff)
downloadyuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar
yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar.gz
yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar.bz2
yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar.lz
yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar.xz
yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.tar.zst
yuzu-3f0cc544cf7184adacec22aedd81f6d796bbea31.zip
Diffstat (limited to '')
-rw-r--r--src/common/CMakeLists.txt11
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)
/we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
/we4800 # Implicit conversion from 'type' to bool. Possible information loss
)
-else()
+endif()
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(common PRIVATE
- $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation>
- $<$<CXX_COMPILER_ID:Clang>:-Werror=unreachable-code-aggressive>
+ -fsized-deallocation
+ -Werror=unreachable-code-aggressive
+ )
+ target_compile_definitions(common PRIVATE
+ $<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,15>:_CANNOT_EXPLICITLY_INSTANTIATE>
)
endif()