summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar comex2023-08-20 14:52:58 -0700
committerGravatar Liam2023-08-25 19:22:31 -0400
commit32c453a5f13f8e1dd11a91aa2de5e3fd6dc3e87c (patch)
tree9d194999e60da9f1d09b9ffe4fe6198baca7d8c4
parentWarnings cleanup for GCC 13 and Clang 16 (diff)
downloadyuzu-32c453a5f13f8e1dd11a91aa2de5e3fd6dc3e87c.tar.gz
yuzu-32c453a5f13f8e1dd11a91aa2de5e3fd6dc3e87c.tar.xz
yuzu-32c453a5f13f8e1dd11a91aa2de5e3fd6dc3e87c.zip
Avoid `$<CXX_COMPILER_ID:Clang>` because it doesn't include AppleClang.
-rw-r--r--externals/CMakeLists.txt8
-rw-r--r--src/CMakeLists.txt20
2 files changed, 16 insertions, 12 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 3a389485b..4a8e1cee9 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -43,8 +43,8 @@ endif()
43add_subdirectory(mbedtls) 43add_subdirectory(mbedtls)
44target_include_directories(mbedtls PUBLIC ./mbedtls/include) 44target_include_directories(mbedtls PUBLIC ./mbedtls/include)
45target_compile_options(mbedcrypto PRIVATE 45target_compile_options(mbedcrypto PRIVATE
46 $<$<CXX_COMPILER_ID:Clang>:-Wno-unused-but-set-variable> 46 -Wno-unused-but-set-variable
47 $<$<CXX_COMPILER_ID:Clang>:-Wno-string-concatenation>) 47 -Wno-string-concatenation)
48 48
49# MicroProfile 49# MicroProfile
50add_library(microprofile INTERFACE) 50add_library(microprofile INTERFACE)
@@ -98,7 +98,9 @@ if (ENABLE_CUBEB AND NOT TARGET cubeb::cubeb)
98 add_subdirectory(cubeb) 98 add_subdirectory(cubeb)
99 add_library(cubeb::cubeb ALIAS cubeb) 99 add_library(cubeb::cubeb ALIAS cubeb)
100 if (NOT MSVC) 100 if (NOT MSVC)
101 target_compile_options(speex PRIVATE -Wno-sign-compare) 101 if (TARGET speex)
102 target_compile_options(speex PRIVATE -Wno-sign-compare)
103 endif()
102 target_compile_options(cubeb PRIVATE -Wno-implicit-const-int-float-conversion) 104 target_compile_options(cubeb PRIVATE -Wno-implicit-const-int-float-conversion)
103 endif() 105 endif()
104endif() 106endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 015b98d60..6068c7a1f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -114,17 +114,19 @@ else()
114 -Wno-attributes 114 -Wno-attributes
115 -Wno-invalid-offsetof 115 -Wno-invalid-offsetof
116 -Wno-unused-parameter 116 -Wno-unused-parameter
117
118 $<$<CXX_COMPILER_ID:Clang>:-Wno-braced-scalar-init>
119 $<$<CXX_COMPILER_ID:Clang>:-Wno-unused-private-field>
120 $<$<CXX_COMPILER_ID:Clang>:-Wno-nullability-completeness>
121 $<$<CXX_COMPILER_ID:Clang>:-Werror=shadow-uncaptured-local>
122 $<$<CXX_COMPILER_ID:Clang>:-Werror=implicit-fallthrough>
123 $<$<CXX_COMPILER_ID:Clang>:-Werror=type-limits>
124 $<$<CXX_COMPILER_ID:AppleClang>:-Wno-braced-scalar-init>
125 $<$<CXX_COMPILER_ID:AppleClang>:-Wno-unused-private-field>
126 ) 117 )
127 118
119 if (CMAKE_CXX_COMPILER_ID MATCHES Clang) # Clang or AppleClang
120 add_compile_options(
121 -Wno-braced-scalar-init
122 -Wno-unused-private-field
123 -Wno-nullability-completeness
124 -Werror=shadow-uncaptured-local
125 -Werror=implicit-fallthrough
126 -Werror=type-limits
127 )
128 endif()
129
128 if (ARCHITECTURE_x86_64) 130 if (ARCHITECTURE_x86_64)
129 add_compile_options("-mcx16") 131 add_compile_options("-mcx16")
130 add_compile_options("-fwrapv") 132 add_compile_options("-fwrapv")