diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 75ebcb03..2571e222 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -15,4 +15,14 @@ set(BENCHMARK_DOWNLOAD_DEPENDENCIES ON) set(BENCHMARK_ENABLE_TESTING OFF) add_subdirectory(google-benchmark) -target_link_libraries(dd_trace_cpp-benchmark benchmark::benchmark dd_trace_cpp-static) +target_include_directories(dd_trace_cpp-benchmark + PRIVATE + ${CMAKE_SOURCE_DIR}/src +) + +target_link_libraries(dd_trace_cpp-benchmark + PRIVATE + benchmark::benchmark + dd_trace::static + nlohmann_json::nlohmann_json +) diff --git a/benchmark/benchmark.cpp b/benchmark/benchmark.cpp index 6387260a..d44c8214 100644 --- a/benchmark/benchmark.cpp +++ b/benchmark/benchmark.cpp @@ -3,9 +3,7 @@ #include #include #include -#include -#include #include #include "hasher.h" @@ -34,7 +32,7 @@ struct SerializingCollector : public dd::Collector { } std::string config() const override { - return nlohmann::json::object({{"type", "SerializingCollector"}}).dump(); + return R"({"type": "SerializingCollector"})"; } }; diff --git a/benchmark/hasher.cpp b/benchmark/hasher.cpp index 40228c49..548b522c 100644 --- a/benchmark/hasher.cpp +++ b/benchmark/hasher.cpp @@ -15,7 +15,6 @@ #include "hasher.h" #include -#include #include #include @@ -97,8 +96,8 @@ int sha256_traced(Digest &digest, const fs::path &path, Digest hash; const fs::path &child = entry; if (sha256_traced(hash, child, span)) { - span.set_error_message( - "unable to calculate digest of " + child.u8string()); + span.set_error_message("unable to calculate digest of " + + child.u8string()); return 1; } children.emplace_back(child, hash); diff --git a/fuzz/base64/CMakeLists.txt b/fuzz/base64/CMakeLists.txt index fd7d7f9f..e2e94d53 100644 --- a/fuzz/base64/CMakeLists.txt +++ b/fuzz/base64/CMakeLists.txt @@ -1,6 +1,12 @@ add_executable(base64-fuzz main.cpp) add_dependencies(base64-fuzz dd_trace_cpp-static) + +target_include_directories(base64-fuzz + PRIVATE + ${CMAKE_SOURCE_DIR}/src +) + target_link_libraries(base64-fuzz dd_trace_cpp-static) add_target_to_group(base64-fuzz dd_trace_cpp-fuzzers) diff --git a/fuzz/w3c-propagation/CMakeLists.txt b/fuzz/w3c-propagation/CMakeLists.txt index e0ebfdac..3988eadc 100644 --- a/fuzz/w3c-propagation/CMakeLists.txt +++ b/fuzz/w3c-propagation/CMakeLists.txt @@ -1,6 +1,11 @@ add_executable(w3c-propagation-fuzz fuzz.cpp) add_dependencies(w3c-propagation-fuzz dd_trace_cpp-static) + +target_include_directories(w3c-propagation-fuzz + PRIVATE + ${CMAKE_SOURCE_DIR}/src +) target_link_libraries(w3c-propagation-fuzz dd_trace_cpp-static) add_target_to_group(w3c-propagation-fuzz dd_trace_cpp-fuzzers)