summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-20 19:24:28 -0400
committerLioncash <mathew1800@gmail.com>2020-10-20 20:28:25 -0400
commit678d012c2c3ce7b6bac136576d15f23b2d4b05a8 (patch)
treea3d71985a6e5456e4efb3cf662460fc29d261cf9 /src
parentfdd91540695594c4b015f234325a950a5e6566e9 (diff)
video_core: Conditially activate relevant compiler warnings
These compiler flags aren't shared with clang, so specifying these flags unconditionally can lead to a bit of warning spam. While we're in the area, we can also enable -Wunused-but-set-parameter given this is almost always a bug.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index 3df54816d..77ebac19f 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -278,7 +278,9 @@ else()
-Wno-error=sign-conversion
-Werror=switch
-Werror=unused-variable
- -Werror=unused-but-set-variable
- -Werror=class-memaccess
+
+ $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess>
+ $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter>
+ $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
)
endif()