[cmake-developers] [CMake 0013476]: FindQt4: Provide option to include libraries as system headers
Mantis Bug Tracker
mantis at public.kitware.com
Thu Aug 16 03:09:22 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=13476
======================================================================
Reported By: Benjamin Kloster
Assigned To:
======================================================================
Project: CMake
Issue ID: 13476
Category: Modules
Reproducibility: N/A
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-08-16 03:09 EDT
Last Modified: 2012-08-16 03:09 EDT
======================================================================
Summary: FindQt4: Provide option to include libraries as
system headers
Description:
Including Qt headers with a high level of warnings enabled (most notably
-Weffc++) causes a plethora of warnings that the user can't fix. These warnings
drown out the warnings in the user's code and prevent the usage of the -Werror
flag to enforce warning free compilation.
CMake provides the SYSTEM option for the INCLUDE_DIRECTORIES command,
instructing GCC (and presumably other compilers as well) to include the
directory as "system header", thus ignoring warnings caused within those
headers.
It would be of great help if the FindQt4 module provided an option to include
the Qt headers as system headers. Attached is a patch for UseQt4.cmake that is
included by FindQt4. This patch adds the control flag
"QT_INCLUDE_AS_SYSTEM_HEADERS" that can be set before the "find_package(Qt4)",
just like QT_USE_XYZ. If set to TRUE, the Qt headers will be included as system
headers, otherwise the old behaviour still applies.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-08-16 03:09 Benjamin KlosterNew Issue
2012-08-16 03:09 Benjamin KlosterFile Added: FindQt4.cmake.system_headers_patch
======================================================================
More information about the cmake-developers
mailing list