forked from jbeder/yaml-cpp
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
Update runtimecore branch with jbeder/yaml-cpp master branch #8
Merged
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
…jbeder#625) - Option defaults to ON and setting it to OFF, disables install target generation
Let CMake handle the default optimizations for various configurations. We don't need to override them. In fact, overriding them makes it impossible for users to override them themselves.
* Removed an expression which is always true * The second expression (ch is space) is removed because the first one contains space 0x20 * nextEmptyLine is always false so it is removed from the expression
The issue is that numbers like 2.01 or 3.01 can not be precisely represented with binary floating point numbers. This replaces all occurrences of 'std::numeric_limits<T>::digits10 + 1' with 'std::numeric_limits<T>::max_digits10'. Background: Using 'std::numeric_limits<T>::digits10 + 1' is not precise enough. Converting a 'float' into a 'string' and back to a 'float' will not always produce the original 'float' value. To guarantee that the 'string' representation has sufficient precision the value 'std::numeric_limits<T>::max_digits10' has to be used.
Splitting the condition of the if statement containing `constant expression` eliminates warnings in Visual Studio with /W4.
NDK now uses ninja for building but yaml-cpp would emit the “ninja: error: build.ninja:326: bad $-escape (literal $ must be written as $$)” error due to syntax error in the generated build.ninja file. Related issue: jbeder#630
… for g++ and clang++ (jbeder#686) * Add compilation flags: -Wshadow -Weffc++ -pedantic -pedantic-errors * Delete implicit copy & move constructors & assignment operators in classes with pointer data members. * An exception to the above: Add default copy & move constructors & assignment operators for the Binary class. * Convert boolean RegEx operators to binary operators. * Initialize all members in all classes in ctors. * Let default ctor delegate to the converting ctor in Binary and RegEx * Don't change any tests except regex_test (as a result of the change to binary operators). Note: https://bugzilla.redhat.com/show_bug.cgi?id=1544675 makes -Weffc++ report a false positive in "include/yaml-cpp/node/impl.h".
It wouldn't have compiled anyways, since the Scanner and Directive objects inside it are incomplete types at the time of the move definitions.
Invalid access via operator[] or as<> will now print the offending key, if possible. For example: a: x: 1 y: 2 node["a"]["z"].as<int>() will say that the key "z" was invalid.
…latforms (jbeder#717) Specifically, printing `.nan`, `.inf`, and `-.inf`, respectively, as per the spec section 10.2.1.4.
This sets the other variables: https://cmake.org/cmake/help/latest/command/project.html
…der#735) Setting CMAKE_CXX_STANDARD and CMAKE_CXX_STANDARD_REQUIRED directly is problematic when including yaml-cpp as a subproject. The proper way is to set these per-target.
…beder#734) * CMake: Prefix options with "YAML" and hide platform-specific options When including yaml-cpp as a subproject, some option names can conflict with other projects. (1) Make sure the yaml-cpp options are prefixed with YAML (2) Hide platform-specific options when possible to avoid cluttering the cmake option list * Update docs for change from BUILD_SHARED_LIBS to YAML_BUILD_SHARED_LIBS
Remove 2.6-isms Remove 2.8-isms Bump CMake minimum version to 3.4 Disable some options when used as a subdirectory Use `CONFIGURE_DEPENDS` with `file(GLOB)` when possible Backport CMake 3.15's MSVC_RUNTIME_LIBRARY setting. Set all compile options as generator expressions. Set all find-package files to be installed to the correct file. Remove `export(PACKAGE)`, as this has been deprecated. Remove fat binary support Remove manual setting of iPhone settings. These should be set by parent projects. Remove use of ExternalProject for a local use Conditionally remove format target unless clang-format is found
Example of how someone might consume yaml-cpp with bazel: cc_binary( name = "example", srcs = ["example.cc"], deps = ["@com_github_jbeder_yaml_cpp//:yaml-cpp"], )
The generator expressions here are actually unnecessary, now that I think about it. This should fix jbeder#745
Per https://cmake.org/cmake/help/latest/policy/CMP0091.html, we need to enable policy CMP0091 if we want to make use of MSVC_RUNTIME_LIBRARY and/or CMAKE_MSVC_RUNTIME_LIBRARY. Fixes issue jbeder#912.
For completeness I've implemented escaping for characters outside the basic multilingual plane, but it doesn't get used (as there's no EscapeAsAsciiJson emitter option implemented).
Not use 'emit' as variable name, in Qt Framework it reserved word
- Don't eagerly convert key to std::string - Make const char* keys streamable when exception is thrown - Don't create a temporary string when comparing a const char* key
…ng emitting. (jbeder#921) * fix issue743: handle the empty content of flow sep/map correctly during emitting. * handle the empty Tag/Anchor properly. * delete comment
convert.h line130 : warning C4244 conversation from int to T possible loss of data
Removed the variable name in the defaulted function to make GCC happy.
…l_cpp_runtimecore
One small nitpick here: I think |
duncanthomson
approved these changes
Sep 8, 2021
Well spotted @duncanthomson ! I've fixed that just now. |
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.
I have followed this process:
Update the branch
master
of the fork ofEsri/yaml-cpp
to the current state ofjbeder/yaml-cpp
:Create a branch where the changes from
master
are synced intoruntimecore
:Note the above conserved all the individual commits that went into
jbeder/yaml-cpp
smaster
.Built the 3rd party tooling and library for all platforms with vTest from the branch
jon10278/update_yaml_cpp_runtimecore
ofEsri/yaml-cpp
.Run a vTest job with the custom tooling from this branch, confirming that everything builds properly and there are no regressions.
This PR: merging the branch
jon10278/update_yaml_cpp_runtimecore
intoruntimecore
, to retain any customizations we made intoruntimecore
, and bring in the updates frommaster
.