From 38666bd4eb9fc5668ce9182e63a7b89238c76849 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Fri, 22 Nov 2024 04:47:44 +0000 Subject: [PATCH 1/5] Make nng private and static --- cmake/dependencies.cmake | 1 - device/CMakeLists.txt | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 96ebbaf5..48d7bf40 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -56,7 +56,6 @@ function(fetch_dependencies) GITHUB_REPOSITORY nanomsg/nng GIT_TAG v1.8.0 OPTIONS - "BUILD_SHARED_LIBS ON" "NNG_TESTS OFF" "NNG_TOOLS OFF" ) diff --git a/device/CMakeLists.txt b/device/CMakeLists.txt index 499e521e..0b008939 100644 --- a/device/CMakeLists.txt +++ b/device/CMakeLists.txt @@ -41,15 +41,14 @@ target_include_directories( ) # flatbuffers is public - exposed to tt_metal by tt_simulation_device_generated.h -# nng is public - exposed to tt_metal by tt_simulation_host.hpp target_link_libraries( device PUBLIC - nng flatbuffers uv PRIVATE hwloc + nng rt Boost::interprocess fmt::fmt-header-only From ed2217943b9408b51030d287e568ecd7e220f333 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Fri, 22 Nov 2024 05:02:52 +0000 Subject: [PATCH 2/5] Use fully qualified garget name, link nng::nng to tests --- device/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/device/CMakeLists.txt b/device/CMakeLists.txt index 0b008939..4af147a4 100644 --- a/device/CMakeLists.txt +++ b/device/CMakeLists.txt @@ -48,7 +48,7 @@ target_link_libraries( uv PRIVATE hwloc - nng + nng::nng rt Boost::interprocess fmt::fmt-header-only diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6829c91b..e4a9edd8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,6 +13,7 @@ target_link_libraries( gtest pthread fmt::fmt-header-only + nng::nng ) target_include_directories( test_common From faf14d4949e5b4652d0a62cfdecaae644b6741ab Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Fri, 22 Nov 2024 05:06:27 +0000 Subject: [PATCH 3/5] Don't Use fully qualified garget name --- device/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device/CMakeLists.txt b/device/CMakeLists.txt index 4af147a4..0b008939 100644 --- a/device/CMakeLists.txt +++ b/device/CMakeLists.txt @@ -48,7 +48,7 @@ target_link_libraries( uv PRIVATE hwloc - nng::nng + nng rt Boost::interprocess fmt::fmt-header-only diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e4a9edd8..a6592b5f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,7 +13,7 @@ target_link_libraries( gtest pthread fmt::fmt-header-only - nng::nng + nng ) target_include_directories( test_common From 708c67fccde2af5c5625c60d9e2036db5ff8f287 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Fri, 22 Nov 2024 05:08:52 +0000 Subject: [PATCH 4/5] Fix lint --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a6592b5f..f7524f36 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,7 +13,7 @@ target_link_libraries( gtest pthread fmt::fmt-header-only - nng + nng ) target_include_directories( test_common From d7200b7cd2838a2fe68f65d3bcaa676928bd98ca Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Fri, 22 Nov 2024 05:20:51 +0000 Subject: [PATCH 5/5] Statically link uv --- cmake/dependencies.cmake | 9 ++++++++- device/CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 48d7bf40..14c9aed5 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -96,7 +96,14 @@ function(fetch_dependencies) ############################################################################################################################ # libuv (for process management) ############################################################################################################################ - CPMAddPackage(NAME libuv GITHUB_REPOSITORY libuv/libuv GIT_TAG v1.48.0 OPTIONS "LIBUV_BUILD_TESTS OFF") + CPMAddPackage( + NAME libuv + GITHUB_REPOSITORY libuv/libuv + GIT_TAG v1.48.0 + OPTIONS + "LIBUV_BUILD_TESTS OFF" + "LIBUV_BUILD_SHARED OFF" + ) ############################################################################################################################ # fmt : https://github.com/fmtlib/fmt diff --git a/device/CMakeLists.txt b/device/CMakeLists.txt index 0b008939..a21d7d81 100644 --- a/device/CMakeLists.txt +++ b/device/CMakeLists.txt @@ -45,11 +45,11 @@ target_link_libraries( device PUBLIC flatbuffers - uv PRIVATE hwloc nng rt + uv_a Boost::interprocess fmt::fmt-header-only yaml-cpp::yaml-cpp