diff options
author | whitequark <whitequark@whitequark.org> | 2021-03-10 06:18:42 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2021-03-10 06:18:42 +0000 |
commit | 979e7b8709c77e30a6b01345e6541cbb7c03e7a8 (patch) | |
tree | 4d0da6dd965b2445efe8c5f8d6b9701baff8b9ac /CMakeLists.txt | |
parent | d1f44fe91ad29b45c715918c97fba4bb243c631f (diff) | |
download | nextpnr-979e7b8709c77e30a6b01345e6541cbb7c03e7a8.tar.gz nextpnr-979e7b8709c77e30a6b01345e6541cbb7c03e7a8.tar.bz2 nextpnr-979e7b8709c77e30a6b01345e6541cbb7c03e7a8.zip |
Only depend on Abseil in threaded builds.
Abseil has a hard dependency on threads (not just in the build system
but in many places in the base libraries), so there is no way to use
it on WASI at the moment.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c8e38a8..b3df6a58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,8 +274,10 @@ 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) + if (USE_THREADS) + target_link_libraries(${target} PRIVATE absl::flat_hash_map) + target_link_libraries(${target} PRIVATE absl::flat_hash_set) + endif() # Include family-specific source files to all family targets and set defines appropriately target_include_directories(${target} PRIVATE ${family}/ ${CMAKE_CURRENT_BINARY_DIR}/generated/) |