Skip to content
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

Adds instruction for using Build2's package manager #1909

Merged
merged 2 commits into from
Jan 28, 2020

Conversation

Klaim
Copy link
Contributor

@Klaim Klaim commented Jan 20, 2020

I created a nlohmann-json package for build2 (https://build2.org) that have been published on the central public repository https://cppget.org : https://cppget.org/nlohmann-json (at the moment you can see that there is only one version: 3.7.3).

The repository of the package code is there: https://github.com/build2-packaging/nlohmann-json and is owned by the build2 community now. (with build2 you can use either a repository like cppget.org or a git repository so both are useful to users for different use cases).

This patch just add the basic information as to how to use this library with build2 to the README file. This is documentation-only.


Pull request checklist

Read the Contribution Guidelines for detailed information.

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

Please don't

  • The C++11 support varies between different compilers and versions. Please note the list of supported compilers. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with #ifdefs or other means.
  • Specifically, I am aware of compilation problems with Microsoft Visual Studio (there even is an issue label for these kind of bugs). I understand that even in 2016, complete C++11 support isn't there yet. But please also understand that I do not want to drop features or uglify the code just to make Microsoft's sub-standard compiler happy. The past has shown that there are ways to express the functionality such that the code compiles with the most recent MSVC - unfortunately, this is not the main objective of the project.
  • Please refrain from proposing changes that would break JSON conformance. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension.
  • Please do not open pull requests that address multiple issues.

I created a `nlohmann-json` package for `build2` (https://build2.org) that have been published on the central public repository https://cppget.org : https://cppget.org/nlohmann-json (at the moment you can see that there is only one version: 3.7.3).

The repository of the package code is there: https://github.com/build2-packaging/nlohmann-json and is owned by the build2 community now. (with build2 you can use either a repository like cppget.org or a git repository so both are useful to users for different use cases).

This patch just add the basic information as to how to use this library with build2.
@Klaim Klaim requested a review from nlohmann as a code owner January 20, 2020 13:51
@coveralls
Copy link

coveralls commented Jan 20, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling ab538ba on Klaim:patch-1 into ad383f6 on nlohmann:develop.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@nlohmann
Copy link
Owner

Thanks a lot! I'll merge once the Travis CI succeeds.

(proper naming suggested by `build2`'s author)
@nlohmann nlohmann merged commit 6ca5338 into nlohmann:develop Jan 28, 2020
@nlohmann
Copy link
Owner


🔖 Release item

This issue/PR will be part of the next release of the library. This template helps preparing the release notes.

Type

  • ✨ New Feature
  • 🐛 Bug Fix
  • ⚡️ Improvement
  • 🔨 Further Change
  • 🔥 Deprecated function

Description


@nlohmann
Copy link
Owner

Thanks!

@nlohmann
Copy link
Owner

nlohmann commented Jan 2, 2025

Hi @Klaim, it's been a while that you added the description for build2. Meanwhile, we created a dedicated documentation page for all supported package managers: https://json.nlohmann.me/integration/package_managers/

Unfortunately, I struggle to create a self-contained example how to compile a small example with build2. Can you support me here?

@Klaim
Copy link
Contributor Author

Klaim commented Jan 2, 2025

Sure!

Looking at the other examples, the self-contained exampled should be "from scratch", that is we create a new project and add the library as a dependency. Do I understand correctly?

@nlohmann
Copy link
Owner

nlohmann commented Jan 2, 2025

Awesome!

Yes, the idea is to show how to compile the given example.cpp with each package manager. In most cases, this boils down to creating a few other files and then call some commands to get the package and build the project.

@Klaim
Copy link
Contributor Author

Klaim commented Jan 2, 2025

Yeah in the case of build2 it's more usual to use bdep new ... to create the new project as it will generate more files than people tend to expect (necessary for consuming packages + handling the project growing) and setup automatically depending on the options. Also at least one configuration need to be created (similar to cmake's build dir but with the dependencies downloaded and built in there too) for dependencies to be usable.

I'll make a PR soon 👍🏽 Maybe not today, probably tomorrow.

Should I also setup a "summary" box as you did with most other tools?

@nlohmann
Copy link
Owner

nlohmann commented Jan 2, 2025

Yes, that would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants