aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-01 09:48:29 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-01 09:55:54 -0800
commit0afa0da19f26ccda4172358602bd5ae9cd404f6c (patch)
tree6b0c7926b30ab971860f439abf40b67e66b1beee /CMakeLists.txt
parent6ff02248a3f625829c9bd041c369247ee926d8d0 (diff)
downloadnextpnr-0afa0da19f26ccda4172358602bd5ae9cd404f6c.tar.gz
nextpnr-0afa0da19f26ccda4172358602bd5ae9cd404f6c.tar.bz2
nextpnr-0afa0da19f26ccda4172358602bd5ae9cd404f6c.zip
Add absl::flat_hash_map.
This lowers the CPU cost of using the flat wire map in router2, and should use less memory as well. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c0537ff..2c8e38a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -171,6 +171,8 @@ if (NOT DEFINED CURRENT_GIT_VERSION)
)
endif()
+add_subdirectory(3rdparty/abseil-cpp EXCLUDE_FROM_ALL)
+
if (BUILD_TESTS)
add_subdirectory(3rdparty/googletest/googletest ${CMAKE_CURRENT_BINARY_DIR}/generated/3rdparty/googletest EXCLUDE_FROM_ALL)
enable_testing()
@@ -272,6 +274,9 @@ foreach (family ${ARCH})
# Include the family-specific CMakeFile
include(${family}/family.cmake)
foreach (target ${family_targets})
+ target_link_libraries(${target} PRIVATE absl::flat_hash_map)
+ target_link_libraries(${target} PRIVATE absl::flat_hash_set)
+
# Include family-specific source files to all family targets and set defines appropriately
target_include_directories(${target} PRIVATE ${family}/ ${CMAKE_CURRENT_BINARY_DIR}/generated/)
target_compile_definitions(${target} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family})