-
Notifications
You must be signed in to change notification settings - Fork 651
Support for dependency-free nlohmann::json #239
Support for dependency-free nlohmann::json #239
Conversation
|
If you will set version in |
user may set Also see wiki about defaults. |
Thanks, missed this stuff from documentation. I'm personally using this project as a template. Updated: forexample/package-example@cf2ea1d |
target_link_libraries(main | ||
nlohmann-json::nlohmann-json) | ||
set_target_properties(main PROPERTIES | ||
COMPILE_FLAGS ${NLOHMANN_JSON_DEFINITIONS}) |
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 compile flags are usage requirement we can add them in *Config.cmake
by INTERFACE_COMPILE_OPTIONS property. Or better by target_compile_options.
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 tried with COMPILE_FLAGS and this was not a cmake whitelisted prop and couldn't find out the right one. Thanks for pointer INTERFACE_COMPILE_OPTIONS.
A little bit confusing. What is the point of this line? Though it came from original code... |
Yes I didn't change it as it came from the original code. I find it strange but it might be some support of libstdc++ which is missing which is in libc++ that the original code use. I removed these switches, as for me both libstdc++ libc++ get the test passed to the same level of success. Speaking for clang 3.5.1 rc2.
Looking at the history it look like the author disabled the MSVC optimization, it might be due to bugs that those incurred? I'm unsure, hopefully @nlohmann can tell us why. As you can see in this commit |
Good to know, it however makes usage of -rc1 suffix impossible there. But that's not a problem as it's anyway not allowing greater-than version check. Thanks. |
I'll take this one as basis in the future, nice organization name. 😄 |
…TEFACE_COMPILE_OPTIONS.
I had no time to follow this thread yet. But just as info: the MSVC flags were set to compile my code at AppVeyor. |
@nlohmann I've got assertion, see nlohmann/json#125 |
Support for dependency-free nlohmann::json
@daminetreg, don't build on Mac OS X. Error: set(NLOHMANN_JSON_DEFINITIONS "@CMAKE_CXX_FLAGS@") |
Actually we don't need this stuff at all. Can be added automatically... |
Just for your information though library is header only we still need to download > 70 MB because of 'test' and 'benchmarks' directories:
|
Fixed: https://github.com/ruslo/hunter/releases/tag/v0.12.32 |
Archive is 16 MB, but anyway |
@ruslo, ths!! |
Hi there, it's been a while since PR nlohmann/json#123 has been opened. I am not sure what it is good for, but it breaks the AppVeyor build. Could you please check if all proposed changes are actually required? |
@nlohmann Compile flags in good vs. broken build are quite the same, I think problem is C++ code. @daminetreg I think you need to rebase your pull request to fetch new updates from C++ sources. |
@daminetreg It make sense to pull this fixes too (see branch |
Thanks @ruslo for the fixes. I'll reopen another PR from the hunter-packages version. @nlohmann I'll check for appveyor, but I think this was the exception handling model chosen that I removed : |
update spdlog
Hi @ruslo,
Hope you are well. 😄
I cmaked the nlohmann::json library here : nlohmann::json cmaked.
Then I made it available with hunter, therefore this pull-request. I would like to move my json fork in the hunter-packages organization if you accept, and I parallely open a PR by nlohmann::json library #123 to get the changes mainline.
Cheers,