Tests are currently failing when git cloning on Windows with autocrlf = true. In
that setup multiline comments contain \r\n EOLs. The test code assumes that
comments contain \n EOLs and opens the .actual files (etc.) with "wt" which
converts \n to \r\n. Thus we end up with \r\r\n EOLs in the output, which
triggers a test failure.
Instead we should cannonicalize comments while reading so that they contain only
\n EOLs. This approach simplifies other parts of the reader and writer logic,
and requires no changes to the test. It is a breaking change, but probably the
Right Thing going forward.
This change also fixes dereferencing past the end of the comment string in
StyledWriter::writeCommentBeforeValue.
Tests should be added with appropriate .gitattributes for the input files to
ensure that we run tests for DOS, Mac, and Unix EOL files on all platforms. For
now this change is enough to unblock Windows builds.
issue #116
1.2.0
`operator=()` (which already performed a deep-copy) now includes comments. This change is probably harmless in all practical cases. But just in case, we bump the minor version.
Address #47.
swap comments too
* Changed `operator=` to exclude start/limit, which should never have been added.
* Changed `swap` to include comments. Hmm. That affects efficiency (but *not* for `operator=`) and probably nothing else in practice.
- issue #47
With set(CMAKE_*_OUTPUT_DIRECTORY) when using jsoncpp as a sub project,
the parent project's executables and libraries will also be outputed to
jsoncpp's directory. By removing this, it is up to the parent projects
to decide where to put their and jsoncpp's executables and libraries.
The TARGET_INCLUDE_DIRECTORIES from inside the
IF(JSONCPP_WITH_CMAKE_PACKAGE) block was removed, since it only needs to
be set once.
In addition the CMAKE_VERSION check was simplified.
Fixed two build issues:
- JsonCPP currently doesn’t compile for Solaris due to platform
differences with ‘isfinite’ function. Fixed by adding proper include
and define for Solaris.
- JsonCPP currently doesn’t compile for GCC version 4.1.2 and earlier
due to use of ‘-Werror=*’ compile flag, which was introduced in a later
version. Fixed by adding version check to only add this flag on
supported versions of GCC.
Fixed two build issues:
- JsonCPP currently doesn’t compile for Solaris due to platform
differences with ‘isfinite’ function. Fixed by adding proper include
and define for Solaris.
- JsonCPP currently doesn’t compile for GCC version 4.1.2 and earlier
due to use of ‘-Werror=*’ compile flag, which was introduced in a later
version. Fixed by adding version check to only add this flag on
supported versions of GCC.