-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Bring Meson build definition more in line with CMake #4452
Open
dcbaker
wants to merge
9
commits into
nlohmann:develop
Choose a base branch
from
dcbaker:submit/meson-updates
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for better readability
Without a version set meson will give no developer warnings, including deprecations. 0.64 was selected as it's quite old, it's the newest version supported by muon (a pure C Meson implementation), and there's nothing complicated going on here.
This simplifies the use of json as a subproject.
This makes a single call to install the entire directory, and doesn't need an update if any new headers are added. It also will simplify bringing the Meson and CMake builds into allignment on how they handle the multi-header vs single-header setups.
Matching the CMake as closely as possible, as Meson doesn't have C++11 feature checks like CMAke does.
dcbaker
force-pushed
the
submit/meson-updates
branch
from
September 9, 2024 18:39
138d391
to
641e353
Compare
gregmarr
reviewed
Sep 9, 2024
dcbaker
force-pushed
the
submit/meson-updates
branch
from
September 9, 2024 20:17
641e353
to
5b5adfe
Compare
This uses a meson option (set in `meson_options.txt`) to control whether multi-header or single-header setup is wanted.
dcbaker
force-pushed
the
submit/meson-updates
branch
from
September 9, 2024 20:20
5b5adfe
to
b65e362
Compare
Is meson_options.txt really needed? If so, can it be moved into a subdirectory? |
Meson options must be specified in a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update the Meson build definition to use Meson best practices, and bring into alignment with the CMake build files.
Particularly, This changes the meson build to only expose a single target, like the CMake does, controlled by an option with the same name. It additionally exposes the
GlobalUDLs
andImplicitConversions
options, which have behavioral implementations a consumer may wish to control. I have not exposed other options as they don't seem to be important for behavior.The options names do not have the
JSON_
prefix, and Meson already has (sub)project option namespaces, so addingJSON_
would worse (-Dnlohmann_json:ImplicitConversions
vs-Dnlohmann_json:JSON_ImplicitConversions
).Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filessingle_include/nlohmann/json.hpp
andsingle_include/nlohmann/json_fwd.hpp
. The whole process is described here.