summaryrefslogtreecommitdiff
path: root/src/yuzu
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/CMakeLists.txt6
-rw-r--r--src/yuzu/uisettings.cpp2
-rw-r--r--src/yuzu/uisettings.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
index 899b75871..5183aabdf 100644
--- a/src/yuzu/CMakeLists.txt
+++ b/src/yuzu/CMakeLists.txt
@@ -235,6 +235,12 @@ if (WIN32 AND YUZU_CRASH_DUMPS)
target_compile_definitions(yuzu PRIVATE -DYUZU_DBGHELP)
endif()
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ target_compile_definitions(yuzu PRIVATE
+ $<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,15>:_CANNOT_EXPLICITLY_INSTANTIATE>
+ )
+endif()
+
file(GLOB COMPAT_LIST
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
diff --git a/src/yuzu/uisettings.cpp b/src/yuzu/uisettings.cpp
index 2a02a27bc..41e2493b3 100644
--- a/src/yuzu/uisettings.cpp
+++ b/src/yuzu/uisettings.cpp
@@ -3,6 +3,7 @@
#include "yuzu/uisettings.h"
+#ifndef _CANNOT_EXPLICITLY_INSTANTIATE
namespace Settings {
template class Setting<bool>;
template class Setting<std::string>;
@@ -12,6 +13,7 @@ template class Setting<u8, true>;
template class Setting<u8>;
template class Setting<unsigned long long>;
} // namespace Settings
+#endif
namespace UISettings {
diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h
index 2152b0b3b..08049f9c4 100644
--- a/src/yuzu/uisettings.h
+++ b/src/yuzu/uisettings.h
@@ -17,6 +17,7 @@
using Settings::Category;
using Settings::Setting;
+#ifndef _CANNOT_EXPLICITLY_INSTANTIATE
namespace Settings {
extern template class Setting<bool>;
extern template class Setting<std::string>;
@@ -26,6 +27,7 @@ extern template class Setting<u8, true>;
extern template class Setting<u8>;
extern template class Setting<unsigned long long>;
} // namespace Settings
+#endif
namespace UISettings {