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
sem
irgen
mir
target_compile_definitions(compiler PRIVATE COMPILER_PARSE_ONLY=0)
else()
target_compile_definitions(compiler PRIVATE COMPILER_PARSE_ONLY=1)