Skip to content

Commit

Permalink
[objcopy][NFC] Add rules to cmake to put files under specific folders.
Browse files Browse the repository at this point in the history
This patch adds rules to cmake to put files under specific folders.

It allows to have files for different formats(which are located in different
subdirectories) be displayed in different subfolders of VS IDE solution.

Depends on D114429

Differential Revision: https://reviews.llvm.org/D114664
  • Loading branch information
avl-llvm committed Feb 18, 2022
1 parent 768e6fa commit a0c0db4
Showing 1 changed file with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions llvm/lib/ObjCopy/CMakeLists.txt
@@ -1,3 +1,34 @@
source_group("Header Files" REGULAR_EXPRESSION
.*[.]h
)
source_group("Header Files\\COFF" REGULAR_EXPRESSION
COFF/.*[.]h
)
source_group("Header Files\\ELF" REGULAR_EXPRESSION
ELF/.*[.]h
)
source_group("Header Files\\MachO" REGULAR_EXPRESSION
MachO/.*[.]h
)
source_group("Header Files\\wasm" REGULAR_EXPRESSION
wasm/.*[.]h
)
source_group("Source Files" REGULAR_EXPRESSION
.*[.]cpp
)
source_group("Source Files\\COFF" REGULAR_EXPRESSION
COFF/.*[.]cpp
)
source_group("Source Files\\ELF" REGULAR_EXPRESSION
ELF/.*[.]cpp
)
source_group("Source Files\\MachO" REGULAR_EXPRESSION
MachO/.*[.]cpp
)
source_group("Source Files\\wasm" REGULAR_EXPRESSION
wasm/.*[.]cpp
)

add_llvm_component_library(LLVMObjCopy
Archive.cpp
ObjCopy.cpp
Expand All @@ -19,8 +50,16 @@ add_llvm_component_library(LLVMObjCopy
wasm/WasmObjcopy.cpp

ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Object

${LLVM_MAIN_INCLUDE_DIR}/llvm/ObjCopy
${LLVM_MAIN_INCLUDE_DIR}/llvm/ObjCopy/COFF
${LLVM_MAIN_INCLUDE_DIR}/llvm/ObjCopy/ELF
${LLVM_MAIN_INCLUDE_DIR}/llvm/ObjCopy/MachO
${LLVM_MAIN_INCLUDE_DIR}/llvm/ObjCopy/wasm
COFF
ELF
MachO
wasm

DEPENDS
intrinsics_gen

Expand Down

0 comments on commit a0c0db4

Please sign in to comment.