summaryrefslogtreecommitdiffstats
path: root/src/common/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r--src/common/CMakeLists.txt34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 3adf13a3f..8a1861051 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -26,12 +26,11 @@ add_library(common STATIC
assert.h
atomic_helpers.h
atomic_ops.h
- detached_tasks.cpp
- detached_tasks.h
bit_cast.h
bit_field.h
bit_set.h
bit_util.h
+ bounded_threadsafe_queue.h
cityhash.cpp
cityhash.h
common_funcs.h
@@ -41,6 +40,8 @@ add_library(common STATIC
container_hash.h
demangle.cpp
demangle.h
+ detached_tasks.cpp
+ detached_tasks.h
div_ceil.h
dynamic_library.cpp
dynamic_library.h
@@ -110,8 +111,12 @@ add_library(common STATIC
scratch_buffer.h
settings.cpp
settings.h
+ settings_common.cpp
+ settings_common.h
+ settings_enums.h
settings_input.cpp
settings_input.h
+ settings_setting.h
socket_types.h
spin_lock.cpp
spin_lock.h
@@ -147,6 +152,10 @@ add_library(common STATIC
zstd_compression.h
)
+if (YUZU_ENABLE_PORTABLE)
+ add_compile_definitions(YUZU_ENABLE_PORTABLE)
+endif()
+
if (WIN32)
target_sources(common PRIVATE
windows/timer_resolution.cpp
@@ -180,6 +189,14 @@ if(ARCHITECTURE_x86_64)
target_link_libraries(common PRIVATE xbyak::xbyak)
endif()
+if (ARCHITECTURE_arm64 AND (ANDROID OR LINUX))
+ target_sources(common
+ PRIVATE
+ arm64/native_clock.cpp
+ arm64/native_clock.h
+ )
+endif()
+
if (MSVC)
target_compile_definitions(common PRIVATE
# The standard library doesn't provide any replacement for codecvt yet
@@ -187,15 +204,20 @@ if (MSVC)
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
)
target_compile_options(common PRIVATE
- /W4
-
/we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data
/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>
+ -fsized-deallocation
+ -Werror=unreachable-code-aggressive
+ )
+ target_compile_definitions(common PRIVATE
+ # Clang 14 and earlier have errors when explicitly instantiating Settings::Setting
+ $<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,15>:CANNOT_EXPLICITLY_INSTANTIATE>
)
endif()