Disabled by default by the request of Nicolas.
Bug: b/
123933266
Change-Id: Ie1217dc6c96ec85c9daf8246de785c8729386634
Reviewed-on: https://swiftshader-review.googlesource.com/c/25015
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
"command": "cmake",
"args": [
"..",
- "-DCMAKE_BUILD_TYPE=${input:buildType}"
+ "-DCMAKE_BUILD_TYPE=${input:buildType}",
+ "-DWARNINGS_AS_ERRORS=1"
],
"options": {
"cwd": "${workspaceRoot}/build"
option (ASAN "Build with address sanitizer" 0)
option (TSAN "Build with thread sanitizer" 0)
option (UBSAN "Build with undefined behavior sanitizer" 0)
+option (WARNINGS_AS_ERRORS "Treat all warnings as errors" 0)
if(ARCH STREQUAL "arm")
set(DEFAULT_REACTOR_BACKEND "Subzero")
set_cpp_flag("-s" RELEASE)
endif()
+ if(WARNINGS_AS_ERRORS)
+ set_cpp_flag("-Werror") # Treat all warnings as errors
+ endif()
+
# Disable pedanitc warnings
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set_cpp_flag("-Wno-ignored-attributes") # ignoring attributes on template argument 'X'