Older versions of cmake, according to documentation:
https://cmake.org/cmake/help/v3.5/command/if.html , do not know
VERSION_LESS_EQUAL, just VERSION_LESS.
This leads to errors:
CMake Error at somewhere/jsoncpp/CMakeLists.txt:18 (if):
if given arguments:
"3.5.1" "VERSION_LESS_EQUAL" "3.13.1"
Unknown arguments specified
Resolves: #866
1) Improve travis build script for use outside travis.
Allow the script used for CI builds to also be used
locally in a similar manner to the CI use of the scrips
2) Add ctest compatible testing and CDASH support
Report testing and building results to
https://my.cdash.org/index.php?project=jsoncpp
NOTE: The new ctest infrastructure is not yet robust on winodws
Do no yet enable the new features for running test with ctest
on windows platform. The previous behaviors are maintainted,
but enhance test reporting from windows is not yet supported.
3) Add a cmake coverage testing option
Ensure that cmake builds on linux are tested.
Ensure that code coverage is reported.
4) Move conditional environment checking into the matrix
Avoid multiple places where conditional logic is used to
change compiler behavior. As more test environments are
created fromt the travis.yml matrix, all settings should be
obvious from that one location.
5) Tests with known regressions from the jsonchecker are suppressed
Tests that are known to pass with jsoncpp more lenient
syntax enforcement are exluded from tests in test/runjsontests.py
Allow configuring without cmake policy developer warnings
for a range of cmake versions.
This prevents the need to explicitly enumerate every new
policy for each new cmake version.
===
Moved setting of the CMAKE_CXX_STANDARD to before the project()
directive.
Plus some other build-related changes. I don't think there is anything
functionally different from 1.7.7, or even any binary incompatibilities, but
the cmake change is significant.
* The GNUInstallDirs module is more idiomatic and supported by
Kitware upstream, whereas the current directories are not
standardised across CMake-using packages. Using CMake native
mechanisms is better than reinventing the wheel, as it makes
using the build system more uniform across the ecosystem
* Use CMAKE_CXX_STANDARD to force C++11
* Require CMake 3.1.0 at a minimum
* Fixed lower/UPPERcase format for function/macro calls
* Fixed indents by replacing tabs with 4 spaces
- if building as a submodule of another repository, installation of pkg-config files can fail because they may not be in the top-level binary directory
- changing ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR} allow CMake to find the files for installation
'-pedantic' issues all warnings demanded by strict ISO C/C++; rejecting
extensions that do not follow ISO C/C++. Without this option, certain GNU
extensions and traditional C/C++ features are supported as well.
With this option enabled building jsoncpp fails with the musl toolchain on
x86 because of an incompatible posix_memalign declaration [1]. Without
'-pedantic' there is no error anymore and jsoncpp builds fine.
Add an option JSONCPP_WITH_STRICT_ISO to disable compilation with '-pedantic'
with GCC. If jsoncpp is build with the JSONCPP_WITH_WARNING_AS_ERROR option
'-pedantic-errors' is used instead.
[1] https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html
* Clean up closing statements for if conditions, functions, macros,
and other entities. Newer versions of CMake do not require you to
redundantly respecify the parameters to the opening arguments.
-Werror shouldn't be used in released code since it can cause random build
failures on moderate warnings. It also depends on the used toolchain since
different toolchains may or may not print the same warnings.