mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-05 10:36:16 +02:00
Fix build issues related to Solaris and older 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.
This commit is contained in:
parent
8dd32e1e2e
commit
54764dd85b
@ -10,7 +10,6 @@ ELSE(JSONCPP_LIB_BUILD_SHARED)
|
||||
SET(JSONCPP_LIB_TYPE STATIC)
|
||||
ENDIF(JSONCPP_LIB_BUILD_SHARED)
|
||||
|
||||
|
||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing")
|
||||
endif( CMAKE_COMPILER_IS_GNUCXX )
|
||||
|
@ -26,6 +26,11 @@
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
#if defined(__sun) && defined(__SVR4) //Solaris
|
||||
#include <ieeefp.h>
|
||||
#define isfinite finite
|
||||
#endif
|
||||
|
||||
namespace Json {
|
||||
|
||||
static bool containsControlCharacter(const char* str) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user