Skip to content

Commit

Permalink
Remove dynhash library variable from Tofino library dependencies. (#5072
Browse files Browse the repository at this point in the history
)

Signed-off-by: fruffy <[email protected]>
Signed-off-by: Fabian Ruffy <[email protected]>
  • Loading branch information
fruffy authored Dec 17, 2024
1 parent 27b4d2f commit 3f3365d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backends/tofino/bf-p4c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ add_definitions("-DRESOURCES_SCHEMA_VERSION=\"${RESOURCES_SCHEMA_VERSION}\"")

set (HAVE_LIBBOOST_GRAPH 1)

set (P4C_LIB_DEPS "${P4C_LIB_DEPS};${Boost_GRAPH_LIBRARY};${LIBDYNHASH_LIBRARY};${Z3_LIB}")
set (P4C_LIB_DEPS "${P4C_LIB_DEPS};${Boost_GRAPH_LIBRARY};${Z3_LIB}")
set (P4C_LIB_DEPS ${P4C_LIB_DEPS} PARENT_SCOPE)

add_subdirectory(logging)
Expand Down Expand Up @@ -1038,7 +1038,7 @@ if (ENABLE_GTESTS)

set (GTEST_SOURCES ${GTEST_SOURCES} ${GTEST_BF_P4C_SOURCES} PARENT_SCOPE)
set (GTEST_LDADD ${GTEST_LDADD}
"bf_gtest_support;tofinobackend;${LIBDYNHASH_LIBRARY};bfn_p4runtime" PARENT_SCOPE)
"bf_gtest_support;tofinobackend;bfn_p4runtime" PARENT_SCOPE)

# TODO: re-enable this test once p4-test is added to the build system
# add_test(NAME test_p4c_driver
Expand Down
7 changes: 4 additions & 3 deletions backends/tofino/bf-utils/dynamic_hash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_library(dynhash_o OBJECT
add_library(dynhash SHARED EXCLUDE_FROM_ALL $<TARGET_OBJECTS:dynhash_o>)

# static lib for compiler with no syslibs
add_library(dynhashStatic STATIC dynamic_hash.c bfn_hash_algorithm.c)
set_target_properties(dynhashStatic PROPERTIES OUTPUT_NAME dynhash)
target_compile_definitions(dynhashStatic PUBLIC NO_BFSYSLIBS)
add_library(tofino_dynhash STATIC dynamic_hash.cpp bfn_hash_algorithm.cpp)
set_target_properties(tofino_dynhash PROPERTIES OUTPUT_NAME dynhash)
target_compile_definitions(tofino_dynhash PUBLIC NO_BFSYSLIBS)

0 comments on commit 3f3365d

Please sign in to comment.