From 3f3365d7f291aadf63f0d307980e325645afc1b1 Mon Sep 17 00:00:00 2001 From: Fabian Ruffy <5960321+fruffy@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:53:39 +0100 Subject: [PATCH] Remove dynhash library variable from Tofino library dependencies. (#5072) Signed-off-by: fruffy Signed-off-by: Fabian Ruffy <5960321+fruffy@users.noreply.github.com> --- backends/tofino/bf-p4c/CMakeLists.txt | 4 ++-- backends/tofino/bf-utils/dynamic_hash/CMakeLists.txt | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/backends/tofino/bf-p4c/CMakeLists.txt b/backends/tofino/bf-p4c/CMakeLists.txt index df143722cd..ef99d9d062 100644 --- a/backends/tofino/bf-p4c/CMakeLists.txt +++ b/backends/tofino/bf-p4c/CMakeLists.txt @@ -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) @@ -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 diff --git a/backends/tofino/bf-utils/dynamic_hash/CMakeLists.txt b/backends/tofino/bf-utils/dynamic_hash/CMakeLists.txt index 6126bd35c4..c239cab88e 100644 --- a/backends/tofino/bf-utils/dynamic_hash/CMakeLists.txt +++ b/backends/tofino/bf-utils/dynamic_hash/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(dynhash_o OBJECT add_library(dynhash SHARED EXCLUDE_FROM_ALL $) # 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) +