File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,24 @@ target_include_directories(LLVMBOLTTargetPowerPC PRIVATE
77 ${LLVM_SOURCE_DIR} /include
88)
99
10+ # Ensure the destination directory exists
1011file (MAKE_DIRECTORY "${LLVM_BINARY_DIR} /include/llvm/Target/PowerPC" )
1112
12- add_custom_command (TARGET LLVMBOLTTargetPowerPC POST_BUILD
13+ # Custom command to copy the .inc file when it's generated
14+ add_custom_command (
15+ OUTPUT "${LLVM_BINARY_DIR} /include/llvm/Target/PowerPC/PPCGenInstrInfo.inc"
1316 COMMAND ${CMAKE_COMMAND} -E copy_if_different
1417 "${LLVM_BINARY_DIR} /lib/Target/PowerPC/PPCGenInstrInfo.inc"
1518 "${LLVM_BINARY_DIR} /include/llvm/Target/PowerPC/PPCGenInstrInfo.inc"
16- )
19+ DEPENDS "${LLVM_BINARY_DIR} /lib/Target/PowerPC/PPCGenInstrInfo.inc"
20+ COMMENT "Copying PPCGenInstrInfo.inc to include directory"
21+ )
22+
23+ # Custom target to represent the copied .inc file
24+ add_custom_target (
25+ BoltCopyPPCGenInstrInfoInc ALL
26+ DEPENDS "${LLVM_BINARY_DIR} /include/llvm/Target/PowerPC/PPCGenInstrInfo.inc"
27+ )
28+
29+ # Make your library depend on the copy
30+ add_dependencies (LLVMBOLTTargetPowerPC BoltCopyPPCGenInstrInfoInc)
You can’t perform that action at this time.
0 commit comments