diff options
| -rw-r--r-- | CMakeLists.txt | 20 | ||||
| -rw-r--r-- | dist/Eglantine.icns | bin | 0 -> 60987 bytes | |||
| -rw-r--r-- | src/CMakeLists.txt | 7 |
3 files changed, 27 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) diff --git a/dist/Eglantine.icns b/dist/Eglantine.icns Binary files differnew file mode 100644 index 0000000000..7169466694 --- /dev/null +++ b/dist/Eglantine.icns diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a2abc7d1b3..c49e252ccb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -178,6 +178,13 @@ else() $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-parameter> $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-missing-field-initializers>) + if (ENABLE_WERROR AND (NOT MSVC)) + add_compile_options( + $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-error=unused> + $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-error=unused-function> + ) + endif() + if (CXX_CLANG OR CXX_ICC OR CXX_APPLE) # Clang, AppleClang, or Intel C++ if (NOT MSVC) add_compile_options( |
