mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 10:43:33 +00:00
fix: Clang Compilation Warnings
This commit is contained in:
@@ -7,10 +7,11 @@ index 5dad9e9..972183d 100644
|
||||
|
||||
add_subdirectory(src)
|
||||
+
|
||||
+# Suppress the -Wclass-memaccess warning from modern GCC/Clang in rapidjson.
|
||||
+# This warning flags intentional, performance-oriented code in the library.
|
||||
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
+# Suppress memcpy warnings from modern GCC/Clang in rapidjson.
|
||||
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
+ target_compile_options(discord-rpc PRIVATE "-Wno-class-memaccess")
|
||||
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang")
|
||||
+ target_compile_options(discord-rpc PRIVATE "-Wno-nontrivial-memcall")
|
||||
+endif()
|
||||
+
|
||||
if (BUILD_EXAMPLES)
|
||||
|
||||
Reference in New Issue
Block a user