File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,15 @@ ELSE(JSONCPP_LIB_BUILD_SHARED)
10
10
SET (JSONCPP_LIB_TYPE STATIC )
11
11
ENDIF (JSONCPP_LIB_BUILD_SHARED)
12
12
13
-
14
13
if ( CMAKE_COMPILER_IS_GNUCXX )
15
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing" )
14
+ #Get compiler version.
15
+ execute_process ( COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
16
+ OUTPUT_VARIABLE GNUCXX_VERSION )
17
+
18
+ #-Werror=* was introduced -after- GCC 4.1.2
19
+ if ( GNUCXX_VERSION VERSION_GREATER 4.1.2 )
20
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing" )
21
+ endif ()
16
22
endif ( CMAKE_COMPILER_IS_GNUCXX )
17
23
18
24
SET ( JSONCPP_INCLUDE_DIR ../../include )
Original file line number Diff line number Diff line change 26
26
#pragma warning(disable : 4996)
27
27
#endif
28
28
29
+ #if defined(__sun) && defined(__SVR4) // Solaris
30
+ #include < ieeefp.h>
31
+ #define isfinite finite
32
+ #endif
33
+
29
34
namespace Json {
30
35
31
36
static bool containsControlCharacter (const char * str) {
You can’t perform that action at this time.
0 commit comments