[PATCH] D114664: [objcopy][NFC] Add rules to cmake to put files under specific folders.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 00:16:28 PST 2021


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/lib/Object/CMakeLists.txt:2
+
+source_group("Header Files\\ObjCopy" FILES
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Object/ObjCopy/CommonConfig.h
----------------
avl wrote:
> jhenderson wrote:
> > The backslashes are surprising to me. Can this be forward slashes, like a cross-platform file path?
> If forward slashes are used then Visual Studio shows "ObjCopy" not as subfolder of "Header Files" but as another folder on the same level as "Header Files".
That's bizarre, but okay.


================
Comment at: llvm/lib/Object/CMakeLists.txt:107-110
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Object/ObjCopy/COFF
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Object/ObjCopy/ELF
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Object/ObjCopy/MachO
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Object/ObjCopy/wasm
----------------
avl wrote:
> jhenderson wrote:
> > Do you need these explicitly?
> yes, we need these. If we do not specify include paths here then corresponding .h files would not be shown in the "Header Files" folder.
Interesting. That suggests the `add_llvm_component_library` function doesn't recurse down the tree, which it intuitively should (possibly auto-adding the source groups along the way). Anyway, not an issue with this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114664/new/

https://reviews.llvm.org/D114664



More information about the llvm-commits mailing list