1
- cmake_minimum_required (VERSION 3.9 )
1
+ cmake_minimum_required (VERSION 3.16 )
2
2
3
3
project ("vpr" )
4
4
@@ -32,6 +32,25 @@ else()
32
32
message (STATUS "EZGL: graphics disabled" )
33
33
endif ()
34
34
35
+
36
+ #Handle server setup
37
+ set (SERVER_DEFINES "" )
38
+
39
+ set (SERVER_DISABILED_REASON "" )
40
+ if (VPR_USE_SERVER )
41
+ if (VPR_USE_EZGL STREQUAL "off" )
42
+ set (SERVER_DISABILED_REASON ", due to EZGL being disabled" )
43
+ set (VPR_USE_SERVER OFF )
44
+ endif ()
45
+ endif ()
46
+
47
+ if (VPR_USE_SERVER )
48
+ message (STATUS "Server mode is enabled" )
49
+ else ()
50
+ list (APPEND SERVER_DEFINES "-DNO_SERVER" )
51
+ message (STATUS "Server mode is disabled${SERVER_DISABILED_REASON} " )
52
+ endif ()
53
+
35
54
# 1st RS patch
36
55
include ("${CMAKE_CURRENT_LIST_DIR} /VPR_CMake_RS1.cmake" )
37
56
message (STATUS "NOTE: INCLUDED VPR_CMake_RS1.cmake\n " )
@@ -65,10 +84,6 @@ list (APPEND LIB_HEADERS ${READ_EDIF_SRC_DIR}/src/edif_blif.hpp)
65
84
66
85
files_to_dirs (LIB_HEADERS LIB_INCLUDE_DIRS )
67
86
68
- if (${VTR_ENABLE_CAPNPROTO} )
69
- add_definitions ("-DVTR_ENABLE_CAPNPROTO" )
70
- endif ()
71
-
72
87
if (${VPR_DEBUG_PARTITION_TREE} )
73
88
message (STATUS "VPR: Partition tree debug logs: enabled" )
74
89
add_definitions ("-DVPR_DEBUG_PARTITION_TREE" )
@@ -84,7 +99,7 @@ add_library(libvpr STATIC
84
99
target_include_directories (libvpr PUBLIC ${LIB_INCLUDE_DIRS} )
85
100
target_include_directories (libvpr PUBLIC ${READ_EDIF_SRC_DIR} )
86
101
87
- #VPR_ANALYTIC_PLACE is inisitalized in the root CMakeLists
102
+ #VPR_ANALYTIC_PLACE is initialized in the root CMakeLists
88
103
#Check Eigen dependency
89
104
if (${VPR_ANALYTIC_PLACE} )
90
105
message (STATUS "VPR Analytic Placement: Requested" )
@@ -100,12 +115,43 @@ if(${VPR_ANALYTIC_PLACE})
100
115
endif (TARGET Eigen3::Eigen )
101
116
endif ()
102
117
118
+ if (${VPR_ENABLE_NOC_SAT_ROUTING} )
119
+ message (STATUS "VPR NoC SAT Routing: Requested" )
120
+ find_package (ortools CONFIG REQUIRED )
121
+ if (TARGET ortools::ortools )
122
+ message (STATUS "VPR NoC SAT Routing dependency (or-tools): Found" )
123
+ message (STATUS "VPR NoC SAT Routing: Enabled" )
124
+ target_link_libraries (libvpr ortools::ortools )
125
+ target_compile_definitions (libvpr PUBLIC -DENABLE_NOC_SAT_ROUTING )
126
+ else ()
127
+ message (STATUS "VPR NoC SAT Routing dependency (or-tools): Not Found (You may need to set CMAKE_PREFIX_PATH in order for CMake to find your OR-Tools installation)" )
128
+ message (STATUS "VPR NoC SAT Routing: Disabled" )
129
+ endif (TARGET ortools::ortools )
130
+ endif ()
131
+
103
132
set_target_properties (libvpr PROPERTIES PREFIX "" ) #Avoid extra 'lib' prefix
104
133
105
- #Specify link-time dependancies
106
- # 2nd RS patch - PRODUCTION_BUILD #TODO disable
107
- #include("${CMAKE_CURRENT_LIST_DIR}/VPR_CMake_PRODUCTION_BUILD_RS2.cmake")
108
- #message(STATUS "NOTE: INCLUDED VPR_CMake_PRODUCTION_BUILD_RS2.cmake\n")
134
+ #Specify link-time dependencies
135
+ target_link_libraries (libvpr
136
+ libvtrutil
137
+ libarchfpga
138
+ libsdcparse
139
+ libblifparse
140
+ libtatum
141
+ libargparse
142
+ libpugixml
143
+ librrgraph
144
+ libreadedif
145
+ ${OPENSSL_LIBRARIES}
146
+ ${VERIFIC_LIBS} dl
147
+ )
148
+
149
+ if (VPR_USE_SERVER )
150
+ target_link_libraries (libvpr
151
+ sockpp-static
152
+ -lz
153
+ )
154
+ endif ()
109
155
110
156
#link graphics library only when graphics set to on
111
157
if (VPR_USE_EZGL STREQUAL "on" )
@@ -143,18 +189,19 @@ if (VPR_USE_EZGL STREQUAL "on")
143
189
144
190
endif ()
145
191
146
- target_compile_definitions (libvpr PUBLIC ${GRAPHICS_DEFINES} )
192
+ target_compile_definitions (libvpr PUBLIC ${GRAPHICS_DEFINES} ${SERVER_DEFINES} )
147
193
148
194
if (${VTR_ENABLE_CAPNPROTO} )
149
195
target_link_libraries (libvpr libvtrcapnproto )
196
+ target_compile_definitions (libvpr PRIVATE VTR_ENABLE_CAPNPROTO )
150
197
endif ()
151
198
152
199
add_executable (vpr ${EXEC_SOURCES} )
153
200
154
201
target_link_libraries (vpr libvpr )
155
202
156
203
157
- #Supress IPO link warnings if IPO is enabled
204
+ #Suppress IPO link warnings if IPO is enabled
158
205
get_target_property (VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION )
159
206
if (VPR_USES_IPO )
160
207
set_property (TARGET vpr APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
@@ -265,14 +312,15 @@ endif()
265
312
# Signal handler configuration
266
313
#
267
314
if (VPR_USE_SIGNAL_HANDLER )
268
- #Check wheter VPR can use sigaction to handle signals (only supported by POSIX)
315
+ #Check whether VPR can use sigaction to handle signals (only supported by POSIX)
269
316
CHECK_CXX_SYMBOL_EXISTS (sigaction csignal HAVE_SIGACTION )
270
317
if (HAVE_SIGACTION )
271
318
target_compile_definitions (libvpr PRIVATE VPR_USE_SIGACTION )
272
319
endif ()
273
320
endif ()
274
321
275
322
install (TARGETS vpr libvpr DESTINATION bin )
323
+ install (FILES ${LIB_HEADERS} DESTINATION include /libvpr )
276
324
277
325
278
326
#
@@ -284,7 +332,7 @@ target_link_libraries(test_vpr
284
332
Catch2::Catch2WithMain
285
333
libvpr )
286
334
287
- #Supress IPO link warnings if IPO is enabled
335
+ #Suppress IPO link warnings if IPO is enabled
288
336
get_target_property (TEST_VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION )
289
337
if (TEST_VPR_USES_IPO )
290
338
set_property (TARGET test_vpr APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
0 commit comments