-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (27 loc) · 947 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.21)
project(LightC)
set(shared_include_dir ${PROJECT_SOURCE_DIR}/shared_include)
set(include_dir ${PROJECT_SOURCE_DIR}/include)
set(arm64_include_dir ${PROJECT_SOURCE_DIR}/asm_include/arm64)
include_directories(${include_dir})
include_directories(${arm64_include_dir})
include_directories(${shared_include_dir})
add_library(${PROJECT_NAME}_lib STATIC
src/bison/lex.yy.cc
src/tac/tac_exp.cpp
src/tac/tac_base.cpp
src/tac/tac_block.cpp
src/tac/tac_func.cpp
src/checker/Checker.cpp
src/checker/TypeManager.cpp
src/utils.cpp
src/object/AsmDump.cpp
src/object/object.cpp
src/checker/TypeInfo.cpp
src/linker/linker.cpp
)
add_executable(LightC src/bison/bison.cpp)
target_link_libraries(LightC ${PROJECT_NAME}_lib)
add_subdirectory(test)
enable_testing()
add_test(test ${CMAKE_SOURCE_DIR}/build/test/LightC_test)