build(build): 拆分子目录 CMakeLists 并规范目标命名
This commit is contained in:
24
src/mir/CMakeLists.txt
Normal file
24
src/mir/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
add_library(mir_core STATIC
|
||||
MIRContext.cpp
|
||||
MIRFunction.cpp
|
||||
MIRBasicBlock.cpp
|
||||
MIRInstr.cpp
|
||||
Register.cpp
|
||||
Lowering.cpp
|
||||
RegAlloc.cpp
|
||||
FrameLowering.cpp
|
||||
AsmPrinter.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mir_core PUBLIC
|
||||
build_options
|
||||
ir
|
||||
)
|
||||
|
||||
add_subdirectory(passes)
|
||||
|
||||
add_library(mir INTERFACE)
|
||||
target_link_libraries(mir INTERFACE
|
||||
mir_core
|
||||
mir_passes
|
||||
)
|
||||
9
src/mir/passes/CMakeLists.txt
Normal file
9
src/mir/passes/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
add_library(mir_passes STATIC
|
||||
PassManager.cpp
|
||||
Peephole.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mir_passes PUBLIC
|
||||
build_options
|
||||
mir_core
|
||||
)
|
||||
Reference in New Issue
Block a user