[libc-commits] [libc] [libc][cmake] Tidy compiler includes (PR #66783)

Sergei Barannikov via libc-commits libc-commits at lists.llvm.org
Wed Sep 20 03:40:40 PDT 2023


================
@@ -189,13 +188,10 @@ function(_build_gpu_objects fq_target_name internal_target_name)
       )
 
       target_compile_options(${gpu_target_name} PRIVATE ${compile_options})
-      target_include_directories(${gpu_target_name} PRIVATE ${include_dirs})
+      target_include_directories(${gpu_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
----------------
s-barannikov wrote:

Marking include directory as "system" will hide warnings from the headers located in this directory.
It might be worth adding -Wsystem-headers to compilation flags to mitigate the issue.


https://github.com/llvm/llvm-project/pull/66783


More information about the libc-commits mailing list