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

Siva Chandra via libc-commits libc-commits at lists.llvm.org
Tue Sep 19 08:37:27 PDT 2023


================
@@ -7,6 +7,11 @@ endif()
 include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
   NO_POLICY_SCOPE)
 
+# `llvm-project/llvm/CMakeLists.txt` adds the following directive
+# `include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR})`
+# We undo it to be able to precisely control what is getting included.
+set_property(DIRECTORY . PROPERTY INCLUDE_DIRECTORIES "")
----------------
sivachandra wrote:

You can use `set_directory_properties`: https://cmake.org/cmake/help/latest/command/set_directory_properties.html

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


More information about the libc-commits mailing list