This happens whenever in a macro you use some "if" block, and don't use curly braces {},
as the macro is expanded on a single line, not on several lines. So just add the missing
curly braces to please gcc.
In file included from /remote/users/mlamesch/CloneFromPlatinum/yamlcpp/osp/Yamlcpp/18-0-0-5/include/yaml-cpp/yaml.h:18,
from src/TestYaml.cpp:2:
/remote/users/mlamesch/CloneFromPlatinum/yamlcpp/osp/Yamlcpp/18-0-0-5/include/yaml-cpp/node/convert.h: In static member function static bool YAML::convert<int>::decode(const YAML::Node&, int&):
/remote/users/mlamesch/CloneFromPlatinum/yamlcpp/osp/Yamlcpp/18-0-0-5/include/yaml-cpp/node/convert.h:139:1: error: this if clause does not guard... [-Werror=misleading-indentation]
YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(int);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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"],
)
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
* 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
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.
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.
* 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".
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: https://github.com/jbeder/yaml-cpp/issues/630
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.
* 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
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.
Roll-forward of c90c08ccc9 "Revert "Improvements to CMake buildsystem (#563)""
NEW:
* Replace CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR
Fixes#612 when yaml-cpp is used as a git submodule.
ORIGINAL:
* Move enable_testing() into proper place
* Added CMake's checks for C++11 standards
Raised minimal version of CMake to 3.1, since on old systems there no
decent compilers that supports c++11.
Closes#377.
* Externalize googletest project
Externalize gtest to avoid installation, fixes#539.
* Remove defined cmake_policies
CMP0012 - OLD marked as deprecated for >=cmake-3.1 and will be removed
CMP0015 - does not affect to build process
CMP0042 - already NEW for >=cmake-3.1
Fixes#505
* Fix compiling in Windows MSVC
* Move enable_testing() into proper place
* Added CMake's checks for C++11 standards
Raised minimal version of CMake to 3.1, since on old systems there no
decent compilers that supports c++11.
Closes#377.
* Externalize googletest project
Externalize gtest to avoid installation, fixes#539.
* Remove defined cmake_policies
CMP0012 - OLD marked as deprecated for >=cmake-3.1 and will be removed
CMP0015 - does not affect to build process
CMP0042 - already NEW for >=cmake-3.1
Fixes#505
* Fix compiling in Windows MSVC