aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDjihad Mahboubi <76681596+Djihads80@users.noreply.github.com>2026-11-01 13:00:12 +0100
committerGitHub <noreply@github.com>2026-11-01 13:00:12 +0100
commit3003c5fa4af06d6b804b18ade5ab1bbea0e81556 (patch)
tree5a0fbffdea92bae53f3ef01dfd3f56dfcc9bd447 /CMakeLists.txt
parente96917cd0e68851ec389dd519f03b52adc11d493 (diff)
parentb610259c74ab3b952fe00e6b5f79e4a1de320ffe (diff)
Merge pull request #105 from shiv121231/nx2
Fixing mac build errors
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 447490b456..ba44aa9d47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,6 +82,26 @@ cmake_dependent_option(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSV
option(ENABLE_DEBUG_TOOLS "Enable debugging tools (maxwell disassembler, SPIRV translator, etc)" OFF)
option(ENABLE_WERROR "Enable -Werror diagnostics" ON)
+# Handle specific -Werror downgrades safely across platforms
+if(ENABLE_WERROR)
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if(CMAKE_C_FLAGS MATCHES "-Werror=unused")
+ string(REPLACE "-Werror=unused" "-Wno-error=unused" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ endif()
+ if(CMAKE_CXX_FLAGS MATCHES "-Werror=unused")
+ string(REPLACE "-Werror=unused" "-Wno-error=unused" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ endif()
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused -Wno-error=unused-function")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused -Wno-error=unused-function")
+ elseif(MSVC)
+ # Windows Specifically
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4100 /wd4101")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4100 /wd4101")
+ endif()
+endif()
+
+
# Lossless Scaling frame generation. Only Android.
option(ENABLE_LSFG "Enable frame generation (LSFG and FSR 3 Fluid Motion)" ON)