mirror of
https://github.com/mikage-emu/mikage-dev.git
synced 2025-01-21 21:11:10 +01:00
CMake: Selectively enable -Werror for common sources of errors
This commit is contained in:
parent
c600e2d4c0
commit
3cb55e40d2
3 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,9 @@ endif()
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
add_compile_options(-Werror=implicit-fallthrough)
|
||||||
|
add_compile_options(-Werror=return-type)
|
||||||
|
|
||||||
# Prefer Conan-provided packages over system ones
|
# Prefer Conan-provided packages over system ones
|
||||||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
|
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ inline std::ostream& operator<<(std::ostream& os, ShaderEngine engine) {
|
||||||
case ShaderEngine::GLSL:
|
case ShaderEngine::GLSL:
|
||||||
return (os << "glsl");
|
return (os << "glsl");
|
||||||
}
|
}
|
||||||
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,3 +53,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
# Required for g_vulkan_queue_mutex
|
# Required for g_vulkan_queue_mutex
|
||||||
target_link_options(video_core PRIVATE "-undefined;dynamic_lookup")
|
target_link_options(video_core PRIVATE "-undefined;dynamic_lookup")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Selectively disable Werror to cover false positives
|
||||||
|
target_compile_options(video_core PRIVATE -Wno-error=return-type)
|
||||||
|
|
Loading…
Reference in a new issue