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)
|
add_subdirectory(src)
|
||||||
+
|
+
|
||||||
+# Suppress the -Wclass-memaccess warning from modern GCC/Clang in rapidjson.
|
+# Suppress memcpy warnings from modern GCC/Clang in rapidjson.
|
||||||
+# This warning flags intentional, performance-oriented code in the library.
|
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
||||||
+ target_compile_options(discord-rpc PRIVATE "-Wno-class-memaccess")
|
+ 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()
|
+endif()
|
||||||
+
|
+
|
||||||
if (BUILD_EXAMPLES)
|
if (BUILD_EXAMPLES)
|
||||||
|
|||||||
Reference in New Issue
Block a user