Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions exporters/fluentd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ set(nlohmann_json_clone FALSE)
if(nlohmann_json_FOUND)
message("Using external nlohmann::json")
else()
include(cmake/nlohmann-json.cmake)
set(nlohmann_json_clone TRUE)
set(nlohmann_json_SOURCE_DIR
"${CMAKE_SOURCE_DIR}/nlohmann_json/single_include")
include_directories(${nlohmann_json_SOURCE_DIR})
message("nlohmann_json package was not found. Cloning from github")
if (MAIN_PROJECT)
include(cmake/nlohmann-json.cmake)
set(nlohmann_json_clone TRUE)
set(nlohmann_json_SOURCE_DIR
"${CMAKE_SOURCE_DIR}/nlohmann_json/single_include")
include_directories(${nlohmann_json_SOURCE_DIR})
message("nlohmann_json package was not found. Cloning from github")
else()
message(FATAL_ERROR "nlohmann_json package was not found which is required for opentelemetry-cpp-fluentd. Please install it")
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message could be more helpful by providing installation guidance. Consider adding information about how to install nlohmann_json (e.g., package manager commands or minimum version requirements).

Suggested change
message(FATAL_ERROR "nlohmann_json package was not found which is required for opentelemetry-cpp-fluentd. Please install it")
message(FATAL_ERROR "nlohmann_json package was not found, which is required for opentelemetry-cpp-fluentd. Please install it using a package manager. For example:\n"
" - vcpkg: ./vcpkg install nlohmann-json\n"
" - apt (Ubuntu): sudo apt install nlohmann-json-dev\n"
" - Homebrew (macOS): brew install nlohmann-json\n"
"Ensure the package is available and meets the minimum version requirements.")

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the dependence installation instructions are not needed here.

endif()
endif()

if(MAIN_PROJECT)
Expand Down