-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
92 lines (79 loc) · 1.83 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
cmake_minimum_required(VERSION 3.28)
project(pcc VERSION 0.3.001)
configure_file(
"${CMAKE_SOURCE_DIR}/config.h.in"
"${CMAKE_BINARY_DIR}/config.h"
)
set(CMAKE_CXX_STANDARD 17)
include_directories(
${CMAKE_BINARY_DIR}
"memory"
"logger"
"file"
"compiler"
"generator"
"wrapper"
"utils"
)
file(GLOB_RECURSE UTILS_SRC
"utils/*.cc"
"utils/*.c"
"utils/*.cpp"
)
file(GLOB_RECURSE LOGGER_SRC
"logger/*.cc"
"logger/*.c"
"logger/*.cpp"
)
file(GLOB_RECURSE MEMORY_SRC
"memory/*.cc"
"memory/*.c"
"memory/*.cpp"
)
file(GLOB_RECURSE FILE_SRC
"file/*.cc"
"file/*.c"
"file/*.cpp"
)
file(GLOB_RECURSE COMPILER_SRC
"compiler/*.cc"
"compiler/*.c"
"compiler/*.cpp"
)
file(GLOB_RECURSE GENERATOR_SRC
"generator/*.cc"
"generator/*.c"
"generator/*.cpp"
"generator/arm64/*.cc"
"generator/arm64/*.c"
"generator/arm64/*.cpp"
)
file(GLOB_RECURSE WRAPPER_SRC
"wrapper/*.cc"
"wrapper/*.c"
"wrapper/*.cpp"
)
add_executable(pcc
main.cpp
${LOGGER_SRC}
${MEMORY_SRC}
${FILE_SRC}
${COMPILER_SRC}
${GENERATOR_SRC}
${WRAPPER_SRC}
${UTILS_SRC}
generator/arm64/register_arm64.h
generator/assembler.cpp
generator/assembler.h
generator/arm64/register_arm64.cpp
generator/arm64/linux_syscall.h
generator/arm64/internal_func_arm64.cpp
generator/arm64/internal_func_arm64.h
)
add_custom_command(
TARGET pcc POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/include
COMMENT "Copying include directory to build output"
)