mirror of https://github.com/qt/qtbase.git
We want to ensure we don't introduce new build warnings in examples. We have a mechanism to enable warnings as errors for qt targets like modules or plugins, but not for targets in example projects. To enable this, we introduce a new internal target PlatformExampleInternal, which is linked to all targets created by qt_add_executable and qt_add_library-like functions in projects in the <repo>/examples subdirectory. The detection of targets in example projects is done by checking the QT_INTERNAL_IS_EXAMPLE_EP_BUILD variable or the QT_INTERNAL_IS_EXAMPLE_IN_TREE_BUILD variable. These are set either by ExternalProject_Add in the case of external example projects, or by qt_examples_build_begin in the case of in-tree example projects. The PlatformExampleInternal target gets the same warnings as errors flags as the other Platform*Internal targets. To enable gradual adoption, the new feature is opt-in rather than opt-out, on a per-repo basis. The QT_REPO_EXAMPLES_WARNINGS_CLEAN variable can be set to TRUE in a repo's '.cmake.conf' file. The warnings as errors behavior is controlled as usual by configuring qt with -DWARNINGS_ARE_ERRORS=ON. Pick-to: 6.8 6.9 6.10 Task-number: QTBUG-108448 Change-Id: If62b47b205c111f2a1fec791e5bb6502f5b64f9c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> |
||
---|---|---|
.github/workflows | ||
LICENSES | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.gitreview | ||
.tag | ||
CMakeLists.txt | ||
REUSE.toml | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
licenseRule.json | ||
qt_cmdline.cmake |