Commit 0eee3325 by Ben Clayton Committed by Ben Clayton

Silence warnings: Ignore pedantic warnings with compiler flags

Addressing this one toolchain at a time, as not all warning names are the same across toolchains. Bug: b/123933266 Change-Id: I618ebafb5ff18a885c71a8e2fa1943befc6786b6 Reviewed-on: https://swiftshader-review.googlesource.com/c/25014 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 3f48ecb3
......@@ -266,6 +266,17 @@ else()
set_cpp_flag("-s" RELEASE)
endif()
# Disable pedanitc warnings
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set_cpp_flag("-Wno-ignored-attributes") # ignoring attributes on template argument 'X'
set_cpp_flag("-Wno-attributes") # 'X' attribute ignored
set_cpp_flag("-Wno-comment") # multi-line comment
set_cpp_flag("-Wno-noexcept-type") # mangled name for ‘X’ will change in C++17 because the exception specification is part of a function type
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_cpp_flag("-Wno-unneeded-internal-declaration") # function 'X' is not needed and will not be emitted
set_cpp_flag("-Wno-unused-private-field") # private field 'offset' is not used - TODO: Consider enabling this once Vulkan is further implemented.
endif()
# For distribution it is more important to be slim than super optimized
set_cpp_flag("-Os" RELEASE)
set_cpp_flag("-Os" RELWITHDEBINFO)
......@@ -2249,6 +2260,7 @@ if(BUILD_SAMPLES)
set_target_properties(OGLES2HelloAPI PROPERTIES
INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
COMPILE_DEFINITIONS "GL_GLEXT_PROTOTYPES"
COMPILE_FLAGS "-Wno-deprecated-declarations" # 'NSTitledWindowMask', 'NSClosableWindowMask' is deprecated
MACOSX_BUNDLE_INFO_PLIST "${HELLO2_DIR}/Build/OSX/Info.plist"
)
target_link_libraries(OGLES2HelloAPI libEGL libGLESv2 ${OS_LIBS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment