Add option JSONCPP_WITH_STRICT_ISO
authorJörg Krause <joerg.krause@embedded.rocks>
Tue, 27 Oct 2015 21:45:17 +0000 (22:45 +0100)
committerJörg Krause <joerg.krause@embedded.rocks>
Thu, 29 Oct 2015 08:16:21 +0000 (09:16 +0100)
commit48bfe910622d79507983fc36254ca9f3ca63acb6
treeff4fe7aa196074104c5ba188252d09395da0f6af
parent0cce773019b6a796dc7f5d3c1af16ec221e4582b
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
CMakeLists.txt