summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2021-07-20 11:35:30 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-21 19:15:25 +0000
commitadee40430d3a21a3221215397ad2158aa1192fd9 (patch)
tree329243830afca8b7061e670d51329f00aead0c26 /src/core
parent996219643c5f1df01ded257917ccde427f14a939 (diff)
Silence GCC warnings in core
Change-Id: I0aabf0d5baec8ba0a4a127d4c5dccf013d775ea2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit ed462df2882dab990f00c5623d35e5fbd86416c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CMakeLists.txt14
-rw-r--r--src/core/tools/CMakeLists.txt3
2 files changed, 17 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 2635d36cd..bd8a7ad01 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -73,6 +73,18 @@ foreach(config ${configs})
resolve_target_includes(gnIncludes WebEngineCore)
get_forward_declaration_macro(forwardDeclarationMacro)
+ set(gnCxxCompileOptions "")
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ # Silence warning in boringssl headers.
+ list(APPEND gnCxxCompileOptions -Wno-ignored-qualifiers)
+
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.2.0")
+ # GCC 11.1 has a regression in the integrated preprocessor, so disable it as a workaround (QTBUG-93360)
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100796
+ list(APPEND gnCxxCompileOptions -no-integrated-cpp)
+ endif()
+ endif()
+
extend_gn_target(${buildGn}
INCLUDES
${gnIncludes}
@@ -83,6 +95,8 @@ foreach(config ${configs})
QTWEBENGINEPROCESS_NAME=\\\\\"${qtWebEngineProcessName}\\\\\"
BUILDING_CHROMIUM
${forwardDeclarationMacro}
+ CXX_COMPILE_OPTIONS
+ ${gnCxxCompileOptions}
SOURCES
accessibility_activation_observer.cpp accessibility_activation_observer.h
accessibility_tree_formatter_qt.cpp
diff --git a/src/core/tools/CMakeLists.txt b/src/core/tools/CMakeLists.txt
index d191f57b9..9d778bb08 100644
--- a/src/core/tools/CMakeLists.txt
+++ b/src/core/tools/CMakeLists.txt
@@ -17,5 +17,8 @@ if(QT_FEATURE_webengine_spellchecker)
qt_internal_extend_target(${dict_target_name} CONDITION WIN32
DEFINES WIN32_LEAN_AND_MEAN NOMINMAX
)
+ qt_internal_extend_target(${dict_target_name} CONDITION GCC OR CLANG
+ COMPILE_OPTIONS -Wno-unused-parameter
+ )
endif()