Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 29 additions & 16 deletions include/CMAKE_fix/PATCHED_VPR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,26 @@ add_library(libvpr STATIC
target_include_directories(libvpr PUBLIC ${LIB_INCLUDE_DIRS})
target_include_directories(libvpr PUBLIC ${READ_EDIF_SRC_DIR})

# Find if Eigen is installed. Eigen is used within the Analytical Solver of the
# Analytical Placement flow. If Eigen is not installed, certain solvers cannot
# be used.
find_package(Eigen3 3.3 NO_MODULE)
if (TARGET Eigen3::Eigen)
target_link_libraries (libvpr Eigen3::Eigen)
target_compile_definitions(libvpr PUBLIC -DEIGEN_INSTALLED)
message(STATUS "Eigen3: Found")
else ()
message(STATUS "Eigen3: Not Found. Some features may be disabled.")
endif (TARGET Eigen3::Eigen)

#VPR_ANALYTIC_PLACE is initialized in the root CMakeLists
#Check Eigen dependency
# NOTE: This is the cluster-level Analytical Placement which existed before the
# flat Analytical Placement flow.
if(${VPR_ANALYTIC_PLACE})
message(STATUS "VPR Analytic Placement: Requested")
find_package(Eigen3 3.3 NO_MODULE)
if (TARGET Eigen3::Eigen)
message(STATUS "VPR Analytic Placement dependency (Eigen3): Found")
message(STATUS "VPR Analytic Placement: Enabled")
target_link_libraries (libvpr Eigen3::Eigen)
target_compile_definitions(libvpr PUBLIC -DENABLE_ANALYTIC_PLACE)
else ()
message(STATUS "VPR Analytic Placement dependency (Eigen3): Not Found (Download manually with sudo apt install libeigen3-dev, and rebuild)")
Expand All @@ -132,19 +143,21 @@ endif ()
set_target_properties(libvpr PROPERTIES PREFIX "") #Avoid extra 'lib' prefix

#Specify link-time dependencies
find_package(ZLIB)
target_link_libraries(libvpr
libvtrutil
libarchfpga
libsdcparse
libblifparse
libtatum
libargparse
libpugixml
librrgraph
libreadedif
${OPENSSL_LIBRARIES}
${VERIFIC_LIBS} dl
)
libvtrutil
libarchfpga
libsdcparse
libblifparse
libtatum
libargparse
libpugixml
librrgraph
libreadedif
${OPENSSL_LIBRARIES}
${VERIFIC_LIBS}
ZLIB::ZLIB dl
)

if(VPR_USE_SERVER)
target_link_libraries(libvpr
Expand Down Expand Up @@ -330,7 +343,7 @@ file(GLOB_RECURSE TEST_SOURCES test/*.cpp)
add_executable(test_vpr ${TEST_SOURCES})
target_link_libraries(test_vpr
Catch2::Catch2WithMain
libvpr)
libvpr -lz)

#Suppress IPO link warnings if IPO is enabled
get_target_property(TEST_VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION)
Expand Down
Loading