Hi,

In response to 

 https://bugreports.qt-project.org/browse/QTBUG-32599

I first considered adding something like

 if(NOT QT_INCLUDE_DIRS_NO_SYSTEM)
   set_property(TARGET Qt5::Core 
     SYSTEM_INTERFACE_INCLUDE_DIRECTORIES
     ${Qt5Core_INCLUDE_DIRS}
   )
 endif()

for each imported target, which would cause CMake to treat the includes for 
it as system includes.

Then I had the idea that I didn't like the API of

 set(QT_INCLUDE_DIRS_NO_SYSTEM 1)
 find_package(Qt5Core)

and I prefered

 find_package(Qt5Core)
 add_library(foo ...)
 target_link_libraries(foo SYSTEM Qt5::Core)

which has a similar effect as the SYSTEM keyword in 
target_include_directories.

I implemented that without a test so far in tll-system-includes-signature in 
my clone. However, the motivation for that is that I generally want to treat 
all 'external' headers as system includes, and Qt is just a common external 
dependency. 

Should we treat the INTERFACE_INCLUDE_DIRECTORIES of all IMPORTED targets as 
SYSTEM includes automatically?

Thanks,

Steve.


--

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

Reply via email to