Commit Graph

80 Commits

Author SHA1 Message Date
Frank Richter
69402d1fbb Bump minor version, SOVERSION 2019-03-23 21:03:30 +01:00
Hans Johnson
2c257590a1 BUG: VERSION_LESS_EQUAL introduced in cmake 3.7
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
2019-01-18 07:00:39 -06:00
Hans Johnson
deb6cca214 STYLE: FATAL_ERROR ignored in cmake_required_minimum since 2.6.0 2019-01-18 07:00:39 -06:00
Hans Johnson
a3c8e86c0b ENH: Refactor and enhance the CI testing infrastructure
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
2019-01-14 16:12:43 -06:00
Hans Johnson
b3b92df879 ENH: Provide range for non-warned cmake versions
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.
2018-12-30 15:32:57 -06:00
Hans Johnson
892a386018 ENH: Use cmake builtin versioning capabilities
The project directive in cmake 3.1 has a builtin
mechanism for providing consistent versioning
in a package.
2018-12-30 15:32:57 -06:00
Hans Johnson
0417e626c0 STYLE: Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command names
became case-insensitive.  Now the preferred style is lower-case.
2018-12-30 15:32:57 -06:00
Julien Schueller
d501fbe741 Set CMAKE_BUILD_TYPE default on win32 too 2018-12-02 18:37:11 -06:00
Julien Schueller
a72266d00b Remove useless BUILD_STATIC_LIBS option 2018-12-02 18:37:11 -06:00
Tomáš Malý
323450eafc allow out-of-source build 2018-04-17 16:16:54 +02:00
Louis Dionne
ffc62d26f3 [CMake] Generate CMake config files by default 2018-04-05 16:37:58 -07:00
Christopher Dunn
ddabf50f72 1.8.4; soversion=20 2017-12-20 15:07:10 -06:00
Christopher Dunn
c98e1d85e3 Bump to soversion=19, 1.8.3
Note that cmake is deprecated, but we keep it in-sync manually for now.
2017-08-28 09:04:33 -05:00
Christopher Dunn
13b5ed7287 1.8.2 <- 1.8.1
Soon, I hope to drop the cmake stuff and let meson handle
the version numbers.
2017-08-27 15:02:01 -05:00
Christopher Dunn
a679dde58d 1.8.1 2017-06-25 22:01:22 -07:00
Gaurav
c68443f3a0 Fix Cmake build issue
FIx cmake build.
2017-03-10 10:33:03 +05:30
Gaurav
11c48d0047 Fix warning issue with gcc flags.
PR for - https://github.com/open-source-parsers/jsoncpp/issues/586
Separating the default options for compiler flags.
2017-03-10 10:22:33 +05:30
Christopher Dunn
f700fe4559 Require cmake>=3.1
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.
2016-12-14 13:39:05 -06:00
David Seifert
f3a4941590
Replace current install variables with GNUInstallDirs
* 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
2016-12-14 17:53:10 +01:00
Christopher Dunn
d8cd848ede 1.7.7 2016-10-02 11:32:21 -05:00
Christopher Dunn
92259f7147 Bump SOVERSION, separate from MAJOR.MINOR.MICRO 2016-10-02 11:29:12 -05:00
Christopher Dunn
45a560a8c0 1.7.6 <- 1.7.5 2016-09-25 19:05:56 -05:00
Merlyn Morgan-Graham
8d54e333ff Add RPATH to dynamic library build on OSX 2016-09-22 22:06:25 -07:00
Christopher Dunn
a304d61a7b 1.7.5 <- 1.7.4 2016-09-01 02:45:08 -05:00
Christopher Dunn
48d2a69d47 1.7.4 <- 1.7.3 2016-07-09 13:27:28 -05:00
Christopher Dunn
318f30357c 1.7.3 2016-06-26 19:40:43 -05:00
Adam Boseley
911e2b0fea By default use <prefix> relative paths when installing
This allows the config file to keep working
when it is installed to a non-standard location
from a make DESTDIR=<location> install
2016-05-04 23:41:18 -07:00
Christopher Dunn
d4a49cf511 Merge pull request #466 from bkuhls/buildroot
CMakeLists.txt: Treat conversion warning as error only with JSONCPP_W…
2016-05-02 20:40:08 -05:00
Bernd Kuhls
17fc9b1a80 CMakeLists.txt: Treat conversion warning as error only with JSONCPP_WITH_WARNING_AS_ERROR=On
Fixes errors when building with buildroot:
http://autobuild.buildroot.net/?reason=jsoncpp-1.7.2

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
2016-04-25 19:47:13 +02:00
ds283
6f22b0e076 Add CMAKE_CXX_FLAGS for Intel compiler 2016-04-25 14:47:05 +01:00
Christopher Dunn
c8054483f8 1.7.2 <- 1.7.1
This only fixes a clang warning, but we have already
seen more than one report for it.
2016-03-25 15:09:15 -05:00
Christopher Dunn
b58c844579 1.7.1 <- 1.7.0
And 1.7.0 is recalled b/c we accidentally
had SecureAlloc by default.
2016-03-21 21:17:56 -05:00
dawesc
ae564653c4 -DJSONCPP_USE_SECURE_MEMORY=1 for cmake
Add allocator.h to amalgamated header
Test JSONCPP_USE_SECURE_MEMORY in Travis
2016-03-19 19:21:15 -05:00
Christopher Dunn
6b562c850d Drop -Wno-sign-conversion suppression 2016-02-07 11:19:04 -06:00
Christopher Dunn
83bc9c7cf6 Errors for sign-compare, since gcc6 is stricter 2016-02-07 11:12:25 -06:00
Christopher Dunn
9a4b1e39bf 1.7.0 < 1.6.5 2016-02-06 10:27:39 -06:00
Christopher Dunn
d4513fcf45 Fix conversion warnings/errors
See #411.
  http://paste.debian.net/378673/
2016-02-06 09:25:20 -06:00
ds283
2cca1cd239 Change ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR}
- 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
2015-12-05 12:18:12 +00:00
Jörg Krause
7c93031c9b Enable -Werror with JSONCPP_WITH_WARNING_AS_ERROR
Commit 912d55094d disabled '-Werror'. Enable it
if jsoncpp is build with JSONCPP_WITH_WARNING_AS_ERROR=ON.
2015-10-29 09:21:01 +01:00
Jörg Krause
48bfe91062 Add option JSONCPP_WITH_STRICT_ISO
'-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
2015-10-29 09:16:21 +01:00
Christopher Dunn
d1a2b94d5b Support ccache
http://stackoverflow.com/a/24305849/263998
2015-10-19 12:10:58 -05:00
Robert Dailey
37aaaec70e Clean up cmake END*
* 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.
2015-08-14 14:31:08 -07:00
Jörg Krause
d7b84f69c5 Remove Werror
-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.
2015-07-30 23:56:28 +02:00
Christopher Dunn
d84702c903 1.6.5 2015-07-23 00:26:13 -05:00
Christopher Dunn
cac79543f8 1.6.4
minor bug-fix
2015-07-12 14:29:53 -05:00
Christopher Dunn
d8186f36a6 -Werror 2015-07-12 14:28:55 -05:00
Christopher Dunn
784433ac72 fix some warnings 2015-07-12 14:28:37 -05:00
Christopher Dunn
7275e3ce3c drop -Wsign-conversion 2015-07-12 12:49:57 -05:00
Christopher Dunn
46aa9d75fa -Wconversion
* https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
* http://programmers.stackexchange.com/questions/122608/clang-warning-flags-for-objective-c-development/124574#124574

In clang: `-Wconversion` implies `-Wshorten-64-to-32`
2015-07-12 12:39:04 -05:00
Christopher Dunn
fac87108a4 -std=c++11 for gcc builds too 2015-07-12 12:08:34 -05:00