@@ -99,15 +99,26 @@ add_library(libvpr STATIC
99
99
target_include_directories (libvpr PUBLIC ${LIB_INCLUDE_DIRS} )
100
100
target_include_directories (libvpr PUBLIC ${READ_EDIF_SRC_DIR} )
101
101
102
+ # Find if Eigen is installed. Eigen is used within the Analytical Solver of the
103
+ # Analytical Placement flow. If Eigen is not installed, certain solvers cannot
104
+ # be used.
105
+ find_package (Eigen3 3.3 NO_MODULE )
106
+ if (TARGET Eigen3::Eigen )
107
+ target_link_libraries (libvpr Eigen3::Eigen )
108
+ target_compile_definitions (libvpr PUBLIC -DEIGEN_INSTALLED )
109
+ message (STATUS "Eigen3: Found" )
110
+ else ()
111
+ message (STATUS "Eigen3: Not Found. Some features may be disabled." )
112
+ endif (TARGET Eigen3::Eigen )
113
+
102
114
#VPR_ANALYTIC_PLACE is initialized in the root CMakeLists
103
- #Check Eigen dependency
115
+ # NOTE: This is the cluster-level Analytical Placement which existed before the
116
+ # flat Analytical Placement flow.
104
117
if (${VPR_ANALYTIC_PLACE} )
105
118
message (STATUS "VPR Analytic Placement: Requested" )
106
- find_package (Eigen3 3.3 NO_MODULE )
107
119
if (TARGET Eigen3::Eigen )
108
120
message (STATUS "VPR Analytic Placement dependency (Eigen3): Found" )
109
121
message (STATUS "VPR Analytic Placement: Enabled" )
110
- target_link_libraries (libvpr Eigen3::Eigen )
111
122
target_compile_definitions (libvpr PUBLIC -DENABLE_ANALYTIC_PLACE )
112
123
else ()
113
124
message (STATUS "VPR Analytic Placement dependency (Eigen3): Not Found (Download manually with sudo apt install libeigen3-dev, and rebuild)" )
@@ -132,19 +143,21 @@ endif ()
132
143
set_target_properties (libvpr PROPERTIES PREFIX "" ) #Avoid extra 'lib' prefix
133
144
134
145
#Specify link-time dependencies
146
+ find_package (ZLIB )
135
147
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
+ libvtrutil
149
+ libarchfpga
150
+ libsdcparse
151
+ libblifparse
152
+ libtatum
153
+ libargparse
154
+ libpugixml
155
+ librrgraph
156
+ libreadedif
157
+ ${OPENSSL_LIBRARIES}
158
+ ${VERIFIC_LIBS}
159
+ ZLIB::ZLIB dl
160
+ )
148
161
149
162
if (VPR_USE_SERVER )
150
163
target_link_libraries (libvpr
@@ -330,7 +343,7 @@ file(GLOB_RECURSE TEST_SOURCES test/*.cpp)
330
343
add_executable (test_vpr ${TEST_SOURCES} )
331
344
target_link_libraries (test_vpr
332
345
Catch2::Catch2WithMain
333
- libvpr )
346
+ libvpr -lz )
334
347
335
348
#Suppress IPO link warnings if IPO is enabled
336
349
get_target_property (TEST_VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION )
0 commit comments