-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
236 lines (211 loc) · 7.71 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
cmake_minimum_required(VERSION 3.1)
project(TritonRoute
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7)
message(FATAL_ERROR "TritonRoute requires GCC 7 and above! \nuse -DCMAKE_CXX_COMPILER to assign your compiler path")
endif()
# Default to bulding optimnized/release executable.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RELEASE)
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(FLEXROUTE_HOME ${PROJECT_SOURCE_DIR} )
set(DEFLIB_HOME
${PROJECT_SOURCE_DIR}/module/def/5.8-p029
)
set(LEFLIB_HOME
${PROJECT_SOURCE_DIR}/module/lef/5.8-p029
)
## include subdirectories
add_subdirectory(${DEFLIB_HOME})
add_subdirectory(${LEFLIB_HOME})
## configure settings
find_package(ZLIB REQUIRED)
find_package(BISON REQUIRED)
find_package(Boost 1.68.0 REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Threads REQUIRED)
set (FLEXROUTE_SRC
${FLEXROUTE_HOME}/src/gr/FlexGRCMap.cpp
${FLEXROUTE_HOME}/src/gr/FlexGR.cpp
${FLEXROUTE_HOME}/src/gr/FlexGR_end.cpp
${FLEXROUTE_HOME}/src/gr/FlexGRGridGraph.cpp
${FLEXROUTE_HOME}/src/gr/FlexGRGridGraph_maze.cpp
${FLEXROUTE_HOME}/src/gr/FlexGR_init.cpp
${FLEXROUTE_HOME}/src/gr/FlexGR_maze.cpp
${FLEXROUTE_HOME}/src/gr/FlexGR_rq.cpp
${FLEXROUTE_HOME}/src/gr/FlexGR_topo.cpp
${FLEXROUTE_HOME}/src/gr/flute/flute.cpp
${FLEXROUTE_HOME}/src/dr/FlexDR_conn.cpp
${FLEXROUTE_HOME}/src/dr/FlexDR_init.cpp
${FLEXROUTE_HOME}/src/dr/FlexDR.cpp
${FLEXROUTE_HOME}/src/dr/FlexDR_maze.cpp
${FLEXROUTE_HOME}/src/dr/FlexGridGraph_maze.cpp
${FLEXROUTE_HOME}/src/dr/FlexGridGraph.cpp
${FLEXROUTE_HOME}/src/dr/FlexDR_rq.cpp
${FLEXROUTE_HOME}/src/dr/FlexDR_end.cpp
${FLEXROUTE_HOME}/src/ta/FlexTA_end.cpp
${FLEXROUTE_HOME}/src/ta/FlexTA_init.cpp
${FLEXROUTE_HOME}/src/ta/FlexTA_rq.cpp
${FLEXROUTE_HOME}/src/ta/FlexTA_assign.cpp
${FLEXROUTE_HOME}/src/ta/FlexTA.cpp
${FLEXROUTE_HOME}/src/global.cpp
${FLEXROUTE_HOME}/src/gc/FlexGC_end.cpp
${FLEXROUTE_HOME}/src/gc/FlexGC_rq.cpp
${FLEXROUTE_HOME}/src/gc/FlexGC.cpp
${FLEXROUTE_HOME}/src/gc/FlexGC_init.cpp
${FLEXROUTE_HOME}/src/gc/FlexGC_main.cpp
${FLEXROUTE_HOME}/src/utility.cpp
${FLEXROUTE_HOME}/src/db/drObj/drShape.cpp
${FLEXROUTE_HOME}/src/db/drObj/drVia.cpp
${FLEXROUTE_HOME}/src/db/infra/frBox.cpp
${FLEXROUTE_HOME}/src/db/infra/frTime_helper.cpp
${FLEXROUTE_HOME}/src/db/infra/frTime.cpp
${FLEXROUTE_HOME}/src/db/infra/frPoint.cpp
${FLEXROUTE_HOME}/src/db/taObj/taShape.cpp
${FLEXROUTE_HOME}/src/db/taObj/taTrack.cpp
${FLEXROUTE_HOME}/src/db/obj/frShape.cpp
${FLEXROUTE_HOME}/src/db/obj/frInst.cpp
${FLEXROUTE_HOME}/src/db/obj/frVia.cpp
${FLEXROUTE_HOME}/src/db/obj/frAccess.cpp
${FLEXROUTE_HOME}/src/db/obj/frRPin.cpp
${FLEXROUTE_HOME}/src/db/obj/frNode.cpp
${FLEXROUTE_HOME}/src/frRegionQuery.cpp
${FLEXROUTE_HOME}/src/io/io_pin.cpp
${FLEXROUTE_HOME}/src/io/io.cpp
${FLEXROUTE_HOME}/src/io/io_guide.cpp
${FLEXROUTE_HOME}/src/io/io_parser_helper.cpp
${FLEXROUTE_HOME}/src/io/defw.cpp
${FLEXROUTE_HOME}/src/pa/FlexPA_init.cpp
${FLEXROUTE_HOME}/src/pa/FlexPA.cpp
${FLEXROUTE_HOME}/src/pa/FlexPA_prep.cpp
${FLEXROUTE_HOME}/src/rp/FlexRP_init.cpp
${FLEXROUTE_HOME}/src/rp/FlexRP.cpp
${FLEXROUTE_HOME}/src/rp/FlexRP_prep.cpp
${FLEXROUTE_HOME}/src/FlexRoute.cpp
)
set (FLEXROUTE_HEADER
${FLEXROUTE_HOME}/src/gr/FlexGR.h
${FLEXROUTE_HOME}/src/gr/FlexGRCMap.h
${FLEXROUTE_HOME}/src/gr/FlexGRGridGraph.h
${FLEXROUTE_HOME}/src/gr/FlexGRWavefront.h
${FLEXROUTE_HOME}/src/gr/flute/flute.h
${FLEXROUTE_HOME}/src/gc/FlexGC.h
${FLEXROUTE_HOME}/src/dr/FlexWavefront.h
${FLEXROUTE_HOME}/src/dr/FlexGridGraph.h
${FLEXROUTE_HOME}/src/dr/FlexMazeTypes.h
${FLEXROUTE_HOME}/src/dr/FlexDR.h
${FLEXROUTE_HOME}/src/frBaseTypes.h
${FLEXROUTE_HOME}/src/ta/FlexTA.h
${FLEXROUTE_HOME}/src/FlexRoute.h
${FLEXROUTE_HOME}/src/db/infra/frTime.h
${FLEXROUTE_HOME}/src/db/infra/frTransform.h
${FLEXROUTE_HOME}/src/db/infra/frPoint.h
${FLEXROUTE_HOME}/src/db/infra/frOrient.h
${FLEXROUTE_HOME}/src/db/infra/frPrefRoutingDir.h
${FLEXROUTE_HOME}/src/db/infra/frBox.h
${FLEXROUTE_HOME}/src/db/infra/frSegStyle.h
${FLEXROUTE_HOME}/src/db/grObj/grAccessPattern.h
${FLEXROUTE_HOME}/src/db/grObj/grBlockObject.h
${FLEXROUTE_HOME}/src/db/grObj/grFig.h
${FLEXROUTE_HOME}/src/db/grObj/grNet.h
${FLEXROUTE_HOME}/src/db/grObj/grNode.h
${FLEXROUTE_HOME}/src/db/grObj/grPin.h
${FLEXROUTE_HOME}/src/db/grObj/grRef.h
${FLEXROUTE_HOME}/src/db/grObj/grShape.h
${FLEXROUTE_HOME}/src/db/grObj/grVia.h
${FLEXROUTE_HOME}/src/db/taObj/taPin.h
${FLEXROUTE_HOME}/src/db/taObj/taTrack.h
${FLEXROUTE_HOME}/src/db/taObj/taVia.h
${FLEXROUTE_HOME}/src/db/taObj/taFig.h
${FLEXROUTE_HOME}/src/db/taObj/taBlockObject.h
${FLEXROUTE_HOME}/src/db/taObj/taShape.h
${FLEXROUTE_HOME}/src/db/gcObj/gcNet.h
${FLEXROUTE_HOME}/src/db/gcObj/gcFig.h
${FLEXROUTE_HOME}/src/db/gcObj/gcBlockObject.h
${FLEXROUTE_HOME}/src/db/gcObj/gcPin.h
${FLEXROUTE_HOME}/src/db/gcObj/gcShape.h
${FLEXROUTE_HOME}/src/db/tech/frTechObject.h
${FLEXROUTE_HOME}/src/db/tech/frConstraint.h
${FLEXROUTE_HOME}/src/db/tech/frLayer.h
${FLEXROUTE_HOME}/src/db/tech/frViaRuleGenerate.h
${FLEXROUTE_HOME}/src/db/tech/frViaDef.h
${FLEXROUTE_HOME}/src/db/tech/frLookupTbl.h
${FLEXROUTE_HOME}/src/db/obj/frBlockObject.h
${FLEXROUTE_HOME}/src/db/obj/frTerm.h
${FLEXROUTE_HOME}/src/db/obj/frPin.h
${FLEXROUTE_HOME}/src/db/obj/frInst.h
${FLEXROUTE_HOME}/src/db/obj/frTrackPattern.h
${FLEXROUTE_HOME}/src/db/obj/frBoundary.h
${FLEXROUTE_HOME}/src/db/obj/frBlockage.h
${FLEXROUTE_HOME}/src/db/obj/frRef.h
${FLEXROUTE_HOME}/src/db/obj/frCMap.h
${FLEXROUTE_HOME}/src/db/obj/frAccess.h
${FLEXROUTE_HOME}/src/db/obj/frInstTerm.h
${FLEXROUTE_HOME}/src/db/obj/frVia.h
${FLEXROUTE_HOME}/src/db/obj/frGuide.h
${FLEXROUTE_HOME}/src/db/obj/frFig.h
${FLEXROUTE_HOME}/src/db/obj/frBlock.h
${FLEXROUTE_HOME}/src/db/obj/frMarker.h
${FLEXROUTE_HOME}/src/db/obj/frNet.h
${FLEXROUTE_HOME}/src/db/obj/frShape.h
${FLEXROUTE_HOME}/src/db/obj/frInstBlockage.h
${FLEXROUTE_HOME}/src/db/obj/frRPin.h
${FLEXROUTE_HOME}/src/db/obj/frNode.h
${FLEXROUTE_HOME}/src/db/drObj/drRef.h
${FLEXROUTE_HOME}/src/db/drObj/drPin.h
${FLEXROUTE_HOME}/src/db/drObj/drAccessPattern.h
${FLEXROUTE_HOME}/src/db/drObj/drShape.h
${FLEXROUTE_HOME}/src/db/drObj/drBlockObject.h
${FLEXROUTE_HOME}/src/db/drObj/drNet.h
${FLEXROUTE_HOME}/src/db/drObj/drMarker.h
${FLEXROUTE_HOME}/src/db/drObj/drFig.h
${FLEXROUTE_HOME}/src/db/drObj/drVia.h
${FLEXROUTE_HOME}/src/frDesign.h
${FLEXROUTE_HOME}/src/frRegionQuery.h
${FLEXROUTE_HOME}/src/global.h
${FLEXROUTE_HOME}/src/io/io.h
${FLEXROUTE_HOME}/src/pa/FlexPA.h
${FLEXROUTE_HOME}/src/rp/FlexRP.h
)
############################################################
# Create a library
############################################################
add_library( flexroutelib
${FLEXROUTE_SRC}
)
set_target_properties( flexroutelib
PROPERTIES OUTPUT_NAME "flexroute"
)
target_include_directories( flexroutelib
PUBLIC
${FLEXROUTE_HOME}/src
)
target_link_libraries( flexroutelib
def
lef
Threads::Threads
OpenMP::OpenMP_CXX
Boost::boost
ZLIB::ZLIB
)
############################################################
# Create an executable
############################################################
add_executable( TritonRoute
${FLEXROUTE_HOME}/src/main.cpp
)
target_link_libraries( TritonRoute
PUBLIC
flexroutelib
)
############################################################
# Install
############################################################
install(FILES ${FLEXROUTE_HEADER} DESTINATION include)
install(TARGETS TritonRoute DESTINATION bin)
install(TARGETS TritonRoute DESTINATION lib)