I use CMake with qt by saying:
find_package(Qt5 COMPONENTS Widgets) Also, I want to use a high warning level and I want treat warnings as errors. So I use:
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra" ) However, I do not care about warnings in the libraries I use. So, for example, to include boost I prepend SYSTEM in the include_directories call, so I do not get bothered by warnings from an external library:
include_directories(SYSTEM ${Boost_INCLUDE_DIR} ) But this does not work for qt, since there is no explicit include_directories statement where I could prepend SYSTEM.
Is there anything I could do about that? I only found a request for that feature here: http://www.itk.org/Bug/print_bug_page.php?bug_id=8710