Re: [cmake-developers] -isystem suppresses warnings from user header
Thanks! I missed that property. Tamas On Thu, Apr 7, 2016 at 4:13 PM, Brad Kingwrote: > On 04/07/2016 10:03 AM, Tamás Kenéz wrote: > > CMake uses "-isystem" on the compiler command line for the > > INTERFACE_INCLUDE_DIRECTORIES of imported libraries. > > > > Question: is this the intended behaviour? > > Yes. See discussion here: > > * http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7533 > > and implementation here: > > * Always consider includes from IMPORTED targets to be SYSTEM. > https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a63fcbcb > > > Can I force the -I flag somehow for my library? > > Look at these: > > * > https://cmake.org/cmake/help/v3.5/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.html > * https://cmake.org/cmake/help/v3.5/prop_tgt/NO_SYSTEM_FROM_IMPORTED.html > > -Brad > > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] -isystem suppresses warnings from user header
On 04/07/2016 10:03 AM, Tamás Kenéz wrote: > CMake uses "-isystem" on the compiler command line for the > INTERFACE_INCLUDE_DIRECTORIES of imported libraries. > > Question: is this the intended behaviour? Yes. See discussion here: * http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7533 and implementation here: * Always consider includes from IMPORTED targets to be SYSTEM. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a63fcbcb > Can I force the -I flag somehow for my library? Look at these: * https://cmake.org/cmake/help/v3.5/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.html * https://cmake.org/cmake/help/v3.5/prop_tgt/NO_SYSTEM_FROM_IMPORTED.html -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] -isystem suppresses warnings from user header
Environment: CMake 3.5, linux, g++ CMake uses "-isystem" on the compiler command line for the INTERFACE_INCLUDE_DIRECTORIES of imported libraries. Unfortunately including a header via an isystem path suppresses warnings emitted from the header, such as warnings caused by expansions of macros defined in that header. Example: I have a printf-like LOG(...) macro which expands to a function marked as printf-like. The -Wformat warnings are suppressed if the containing log.h is found on isystem path. Question: is this the intended behaviour? Can I force the -I flag somehow for my library? (I'm aware of CMAKE_INCLUDE_SYSTEM_FLAG_CXX but I don't want to modify all the client projects that uses my library.) Or is it bug? Thanks, Tamas -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers