From 8ea6930781befc2dfbf9b22b9b00d7de94773cf1 Mon Sep 17 00:00:00 2001 From: Dominik Charousset Date: Sun, 28 Apr 2024 10:02:37 +0200 Subject: [PATCH] Disable tools when building Broker as sub-project Projects that build Broker only as a dependency (like Zeek) have no use for the benchmark tools. Hence, those targets should be excluded from the build to avoid building superfluous binaries but also since they might cause build issues in some scenarios. --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcb01f51..4c23b2ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -295,9 +295,11 @@ endif () # -- Tools and benchmarks ----------------------------------------------------- -add_subdirectory(broker-node) -add_subdirectory(broker-pipe) -add_subdirectory(broker-throughput) +if (NOT broker_is_subproject) + add_subdirectory(broker-node) + add_subdirectory(broker-pipe) + add_subdirectory(broker-throughput) +endif () # -- Bindings -----------------------------------------------------------------