-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nlohmann_json package dependency #1017
Fix nlohmann_json package dependency #1017
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1017 +/- ##
==========================================
- Coverage 95.41% 94.83% -0.57%
==========================================
Files 161 151 -10
Lines 6833 5972 -861
==========================================
- Hits 6519 5663 -856
+ Misses 314 309 -5 |
# This option allows to add header to include directories | ||
include_directories( | ||
${PROJECT_SOURCE_DIR}/third_party/nlohmann-json/single_include) | ||
if(EXISTS ${PROJECT_SOURCE_DIR}/.git) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the repo is cloned without submodule, will this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now modified the second if
condition to make it more explicit.
Error message if cloned without submodules,
nlohmann_json package was not found. Please either provide it manually or
clone with submodules. To initialize, fetch and checkout any nested
submodules, you can use the following command:
git submodule update --init --recursive
Error message if using release tar-ball:
CMake Error at CMakeLists.txt:290 (find_package):
By not providing "Findnlohmann_json.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"nlohmann_json", but CMake did not find one.
Could not find a package configuration file provided by "nlohmann_json"
with any of the following names:
nlohmann_jsonConfig.cmake
nlohmann_json-config.cmake
Add the installation prefix of "nlohmann_json" to CMAKE_PREFIX_PATH or set
"nlohmann_json_DIR" to a directory containing one of the above files. If
"nlohmann_json" provides a separate development package or SDK, be sure it
has been installed.
Fixes # 981
nlohmann_json
package should be required only when the component using it are part of the build, else be ignored.zpage
and test for validatingw3c trace-context
optional in build, as they both use nlohmann_json.For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes