Re: [cmake-developers] [CMake 0013476]: FindQt4: Provide option to include libraries as system headers

2012-11-30 Thread Thomas Sondergaard

On 16-08-2012 09:09, Mantis Bug Tracker wrote:


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 ModifiedUsername   FieldChange
==
2012-08-16 03:09 Benjamin KlosterNew Issue
2012-08-16 03:09 Benjamin KlosterFile Added: FindQt4.cmake.system_headers_patch

==

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers



Any chance we can have this included in the next cmake release? I've 
tested v2.8.9_FindUseQt4.cmake_system_include2.patch and it looks good 
to me.


Regards,

Thomas

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0013476]: FindQt4: Provide option to include libraries as system headers

2012-08-16 Thread Mantis Bug Tracker

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 ModifiedUsername   FieldChange   
== 
2012-08-16 03:09 Benjamin KlosterNew Issue
2012-08-16 03:09 Benjamin KlosterFile Added: FindQt4.cmake.system_headers_patch 
  
==

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers