You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
629 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# src/ 子目录构建脚本:各子目录独立维护 CMakeLists.txt并在此聚合链接
add_subdirectory(utils)
add_subdirectory(ir)
add_subdirectory(frontend)
if(NOT COMPILER_PARSE_ONLY)
add_subdirectory(sem)
add_subdirectory(irgen)
add_subdirectory(mir)
endif()
add_executable(compiler
main.cpp
)
target_link_libraries(compiler PRIVATE
frontend
utils
)
if(NOT COMPILER_PARSE_ONLY)
target_link_libraries(compiler PRIVATE
sem
irgen
mir
)
target_compile_definitions(compiler PRIVATE COMPILER_PARSE_ONLY=0)
else()
target_compile_definitions(compiler PRIVATE COMPILER_PARSE_ONLY=1)
endif()