I am using CMake with qt saying:
find_package(Qt5 COMPONENTS Widgets)
In addition, I want to use a high level of warning, and I want to treat warnings as errors. Therefore, I use:
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra" )
However, I do not care about the warnings in the libraries that I use. So, for example, to enable boost, I prepend SYSTEMin the call include_directories, so I'm not worried about warnings from an external library:
include_directories(SYSTEM ${Boost_INCLUDE_DIR} )
But it does not work for qt, since there is no explicit expression include_directories
which I might add SYSTEM.
What can I do about it? I found a request for this function here:
http://www.itk.org/Bug/print_bug_page.php?bug_id=8710